From b27383e45333db60ae4c412ccf609daeba008e2e Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Fri, 20 Apr 2012 16:17:54 +0200 Subject: [PATCH] ffprobe: do not try to decode empty packets. Fixes sporadic decode failures and trac ticket #997. --- ffprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)