Les articles publiés sur le site
-
6 juillet 2016, par Max Kellermann
stream_decoder: check state==ABORTED after process_single() for seek
FLAC__stream_decoder_process_single() ignores frame_sync_() errors,
which means the caller cannot rely solely on the boolean return value,
it is also required to check the new "state".
After FLAC__stream_decoder_process_until_end_of_metadata(),
state==SEARCH_FOR_FRAME_SYNC and
last_frame.header.number_type==FRAME_NUMBER. When an application
seeks at this time, but an I/O error occurs, then
FLAC__stream_decoder_process_single() returns true, but no frame has
been read yet, i.e. last_frame.header.number_type is still
FRAME_NUMBER. This triggers the assertion in
seek_to_absolute_sample_():
FLAC__ASSERT(decoder->private_->last_frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER);
So what needs to be done is check for state==ABORTED after the
FLAC__stream_decoder_process_single() call.
This bug can be triggered remotely with the Music Player Daemon
(https://www.musicpd.org/), and crashes the process.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Closes: https://github.com/xiph/flac/pull/12
- [DH] src/libFLAC/stream_decoder.c
-
30 juin 2016, par Erik de Castro Lopo
libFLAC/cpu.c: Fix dfprintf macro for MSVS
-
27 juin 2016, par Erik de Castro Lopo
libFLAC/cpu.c: Add parens to avoid compiler warnings
-
27 juin 2016, par Julian Calaby
libFLAC/cpu.c: Inline *_disable_avx()
Also only print out OS AVX status if AVX is actually enabled.
-
27 juin 2016, par Julian Calaby
libFLAC/cpu.c: Move cpu_id_ex into cpu_info_x86()
This simplifies the C code without complexifying the preprocessor
code.