[FFmpeg-devel] [PATCH 07/19] wmaprodec: fix return value for too small packets.
nicolas.george at normalesup.org
Sun Jul 29 19:49:50 CEST 2012
Le duodi 12 thermidor, an CCXX, Reimar Döffinger a écrit :
> > - return 0;
> > + return buf_size ? AVERROR_INVALIDDATA : 0;
> I don't really think empty packets should be considered valid for WMA.
AFAIK, empty packets are never considered valid by themselves (some time ago
we had ffprobe feeding empty packets to the h264 decoder causing segfaults
and double frees). Empty packets are used to flush the decoders, but lavc is
supposed to filter them if !CODEC_CAP_DELAY.
So this patch can become "return AVERROR_INVALIDDATA;" if you like it
better. The point of it was not to return 0 on non-empty packets.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel