[FFmpeg-devel] [PATCH] FLAC parser

Felipe Contreras felipe.contreras
Sun Sep 26 02:00:06 CEST 2010

On Sun, Sep 26, 2010 at 2:47 AM, Felipe Contreras
<felipe.contreras at gmail.com> wrote:
> On Fri, Aug 20, 2010 at 10:32 AM, Michael Chinen <mchinen at gmail.com> wrote:
>> On Wed, Aug 18, 2010 at 7:29 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> [...]
>>>> Putting in MN's suggestion to concatenate sequential valid CRCs instead of checking them twice.
>>> elaborate on what you do here please
>> When a new header candidate (FLACHeaderMarker) is found and added as
>> the nth header a linked list, CRC is verified from the start of the
>> n-1 header to the nth. ?If this check fails, the n-2 header to n CRC
>> is computed up to n-kth header, where k is the
>> FLAC_MAX_SEQUENTIAL_HEADERS constant. ?If a check succeeds the (m-1)
>> bit of the N-mth FLACHeaderMarker's crc_valid is set. ?Then all
>> headers that came before it and within the max distance are marked
>> valid to the nth header by having the appropriate bit of crc_valid set
>> if they are marked valid to the N-mth header.
>> This means that if CRCs verify no byte will be double checked. ?If a
>> header's crc fails, then they will. ? This could be removed at the
>> cost of tracking non zero CRC remainders for those that fail, but
>> since this does not happen often, I thought it was a not a good
>> optimization.
> These don't work for me, I just get a bunch of:
> Error while decoding stream #0.0
> [flac @ 0x933d6a0] invalid frame header: frame sync error
> [flac @ 0x933d6a0] decode_frame() failed
> Oh, and BTW, other projects put the patch series changes in the
> diffstat of the patch (so it's not part of the commit message).


Since now the decoder doesn't work without the parser, wouldn't a
dependency should somehow be specified?

Felipe Contreras

More information about the ffmpeg-devel mailing list