summaryrefslogtreecommitdiff
path: root/ffprobe.c
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 /ffprobe.c
parentdd3043d1c0c1dafffbc98c97d5eabb07c545c22a (diff)
ffprobe: do not try to decode empty packets.
Fixes sporadic decode failures and trac ticket #997.
Diffstat (limited to 'ffprobe.c')
-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)