[FFmpeg-devel] [PATCH 1/4] wmaprodec: fix return value for too small packets.

Michael Niedermayer michaelni at gmx.at
Tue Jul 31 19:58:16 CEST 2012

On Tue, Jul 31, 2012 at 07:28:48PM +0200, Nicolas George wrote:
> Le quartidi 14 thermidor, an CCXX, Michael Niedermayer a écrit :
> > IMHO the decoder should just decode the packet no matter what size it
> > has
> Maybe that would be better, but that is not what it currently does, and
> changing its behaviour is way beyond my knowledge of that codec. The purpose
> of this patch was only to avoid returning 0 (success) when no progress was
> done at all nor can be done.

the code currently returns 0 and clears packet_done only when
packet_done is 1. If we assume that the same data gets passed in
again in the return 0 case then the decoder might successfully
decode the packet in the packet_done = 0 branch with no data loss or

I have no test file for this or at least iam not aware of it and so dont
know if this case really works out or gets stuck elsewhere but if it
works then your patch breaks it


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Observe your enemies, for they first find out your faults. -- Antisthenes
-------------- 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/20120731/33130409/attachment.asc>

More information about the ffmpeg-devel mailing list