[FFmpeg-devel] [PATCH] FLAC parser

Justin Ruggles justin.ruggles
Sun Aug 1 20:34:59 CEST 2010

Justin Ruggles wrote:

> Justin Ruggles wrote:
>> Hi,
>> Michael Chinen wrote:
>>> Hi,
>>> Thanks Justin and Diego, these were good suggestions, and I've put
>>> them all in, attached here (don't forget to apply the original second
>>> patch if you are testing on ffplay.)
>> There seems to be something still not working correctly.  I have a
>> perfectly valid flac file that passes "flac -t" but the parser skips 3
>> places that it thinks are junk frames and leads to 3 places with
>> multiple frames per packet.  It also segfaults in the decoder at the
>> last frame (the buffer size is correct but apparently not the buffer
>> pointer).
>> I'll try to see if I can figure out where it's going wrong, but I
>> decided to go ahead and point it out to you now so you can do more testing.
> Your previous patch actually worked fine, and if I copy only
> flac_parser.c from your last patch and keep the rest of the current
> patch the same it works fine.  The only non-cosmetic difference I could
> find right away that would have an effect was the splitting out of the
> return_best_header section into its own function.  There is one logical
> difference in the if/else, but even after I changed that I still got the
> segfault at the end.  I'll keep looking to see if I can spot any other
> differences...

Ok, I found it.  It was just one change.  I modified your patch as
follows and it works.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix_flac_parser.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100801/6cffc749/attachment.asc>

More information about the ffmpeg-devel mailing list