From: Nicolas George Date: Fri, 20 Apr 2012 14:17:54 +0000 (+0200) Subject: ffprobe: do not try to decode empty packets. X-Git-Tag: n0.11~631 X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff_plain;h=b27383e45333db60ae4c412ccf609daeba008e2e ffprobe: do not try to decode empty packets. Fixes sporadic decode failures and trac ticket #997. --- diff --git a/ffprobe.c b/ffprobe.c index 8a76a0bacd..43aa1c5f4c 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -1279,7 +1279,7 @@ static void read_packets(WriterContext *w, AVFormatContext *fmt_ctx) } if (do_read_frames) { pkt1 = pkt; - while (1) { + while (pkt1.size) { avcodec_get_frame_defaults(&frame); ret = get_decoded_frame(fmt_ctx, &frame, &got_frame, &pkt1); if (ret < 0 || !got_frame)