[FFmpeg-devel] [PATCH] flac demuxer

Justin Ruggles justinruggles
Sat May 3 00:33:35 CEST 2008

Mike Melanson wrote:
> Justin Ruggles wrote:
>> I'll take a look. Probably the last partial-frame is not decoded. I
>> vaguely remember this issue, but I don't remember the specifics of the
>> problem.
> I would like to be able to add a FATE test for FLAC. It's convenient
> that the data is expected to be bit exact across platforms. However,
> this is one of those rare cases when it's also easy to validate it
> against an official reference.

At first look, it seems like a parser is exactly what is needed.
Currently, the decoder keeps an internal buffer, and only tries to
decode if that buffer has at least max_frame_size bytes.

see libavcodec/flac.c:611 where it says "//FIXME truncated"

A proper parser should look in the packet for the next frame start
header or EOF, and possibly also check the CRC on the header and/or the
whole frame before passing it to the decoder.

I'll see if I can attempt that after I get the fixed demuxer into SVN.


More information about the ffmpeg-devel mailing list