[FFmpeg-cvslog] ffprobe: do not try to decode empty packets.

Nicolas George git at videolan.org
Sat Apr 21 14:04:00 CEST 2012


ffmpeg | branch: master | Nicolas George <nicolas.george at normalesup.org> | Fri Apr 20 16:17:54 2012 +0200| [b27383e45333db60ae4c412ccf609daeba008e2e] | committer: Nicolas George

ffprobe: do not try to decode empty packets.

Fixes sporadic decode failures and trac ticket #997.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b27383e45333db60ae4c412ccf609daeba008e2e
---

 ffprobe.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ffprobe.c b/ffprobe.c
index 8a76a0b..43aa1c5 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)



More information about the ffmpeg-cvslog mailing list