[FFmpeg-devel] ffprobe: Do not decode zero-sized packets in ffprobe -show_frame

Stefano Sabatini stefasab at gmail.com
Sat Mar 3 19:38:15 CET 2012

On date Tuesday 2012-02-21 11:18:44 +0100, Petter Ericson encoded:
> On Mon, Feb 20, 2012 at 06:00:29PM +0100, Stefano Sabatini wrote:
> > This should be fine, but I'd prefer to fix the crash in the decoder
> > instead.
> > 
> > Indeed from my reading of the documentation there is nothing wrong
> > about passing video packets with size of 0, and the expected behavior
> > should be to just ignore such packets, thus avoiding to complicate
> > application level code.
> I agree that this would be ideal, but I am not familiar enough with the
> relevant decoders and standards to feel comfortable in submitting a fix for
> that.. And ffmpeg.c does not decode zero-sized packets unless flushing,
> which is why the segfault does not appear when transcoding.
> I will take another look at the problem, though, and see if I can find a
> solution in the decoder instead.

I tried to have a look at the h264.c but it's over me, the problem
here seems related to threading. The current solution works for me,
and should prevent unexpected conditions in the other decoders as
well, tested fate and no regressions found.
FFmpeg = Fierce & Fast Miracolous Picky Energized Gigant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-lavc-make-avcodec_decode_video2-immediately-return-0.patch
Type: text/x-diff
Size: 1256 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120303/5daf0056/attachment.bin>

More information about the ffmpeg-devel mailing list