[FFmpeg-devel] [PATCH 09/19] binkaudio: eliminate packet_buffer.

Nicolas George nicolas.george at normalesup.org
Sun Jul 29 20:40:43 CEST 2012

Le duodi 12 thermidor, an CCXX, Reimar Döffinger a écrit :
> The documentation of decode_audio* does not mention anything like that,
> so I think we should avoid any code that does not do it this way.

The current code in binkaudio works this way: it copies the whole packet
into an internal buffer, decodes the first sub-packet and returns the size
of the whole packet, and on next calls decodes the next sub-packets and
returns 0, until the packet is finished.

It still requires the application to loop on decode_video4().

> If a parser was added I'd expect the decoder to still return the correct
> processed data number.

So, if I understand you correctly, Justin should have added a parser instead
of this commit:

# commit 4f4e19480a1b254d1d049cffffb11f13ae54b53a
# Author: Justin Ruggles <justin.ruggles at gmail.com>
# Date:   Wed Oct 26 11:02:12 2011 -0400
#     binkaudio: only decode one block at a time.
#     This prevents truncating output due to an output buffer that is too small for
#     all blocks. There is no limit on the number of blocks in a packet.


I am a bit unsure about the parser, though: there is a 4-bytes size field in
front of the first packet, I do not know whether parsers can re-add it after


  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120729/b073a979/attachment.asc>

More information about the ffmpeg-devel mailing list