[FFmpeg-devel] [PATCH] make FLAC parser return frames when it has the required amount (without buffering)

Michael Chinen mchinen
Sat Dec 11 20:34:50 CET 2010


On Sat, Dec 11, 2010 at 4:56 PM, Justin Ruggles
<justin.ruggles at gmail.com> wrote:
> On 12/10/2010 04:30 PM, Michael Chinen wrote:
>
>> The FLAC parser wasn't behaving well for large inputs.
>> For the problem, see discussion in thread "FLAC parser ineffeciency"
>>
>> I tested this patch with 16K, 32K, and 10MB input and it seems to work.
>> I should note that the parser buffers by copying the entire input so
>> for the 10MB case this is using a lot of space. ?Not an issue for
>> small buffer sizes, but if it is a real use case and should be
>> improved let me know and I can submit a separate patch that only takes
>> small chunks of the input buffer.
>
>
> If it's not too complicated, it might be better to have the parser guess
> how much data it needs to have enough frames to do the analysis and only
> read that much.

Ok, this should do it.

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-make-FLAC-parser-return-frames-when-it-has-the-requi.patch
Type: application/octet-stream
Size: 2922 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101211/fe4fcc5c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-flac_parser.c-only-buffer-the-estimated-amount-of-in.patch
Type: application/octet-stream
Size: 4596 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101211/fe4fcc5c/attachment-0001.obj>



More information about the ffmpeg-devel mailing list