aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-04-20 16:17:54 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-04-21 14:02:08 +0200
commitb27383e45333db60ae4c412ccf609daeba008e2e (patch)
treeeb8085e675982144233dae0836a9eb94332ad60a
parentdd3043d1c0c1dafffbc98c97d5eabb07c545c22a (diff)
downloadffmpeg-b27383e45333db60ae4c412ccf609daeba008e2e.tar.gz
ffprobe: do not try to decode empty packets.
Fixes sporadic decode failures and trac ticket #997.
-rw-r--r--ffprobe.c2
1 files changed, 1 insertions, 1 deletions
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)