]> git.sesse.net Git - ffmpeg/commitdiff
ffprobe: do not try to decode empty packets.
authorNicolas George <nicolas.george@normalesup.org>
Fri, 20 Apr 2012 14:17:54 +0000 (16:17 +0200)
committerNicolas George <nicolas.george@normalesup.org>
Sat, 21 Apr 2012 12:02:08 +0000 (14:02 +0200)
Fixes sporadic decode failures and trac ticket #997.

ffprobe.c

index 8a76a0bacd18e2585f83a9d803ebfcd9689bd6cb..43aa1c5f4c11cd06814968864c9355bafa6da64a 100644 (file)
--- 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)