From 6072a19b4f311cb172d45e90daad90824e40e4b6 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 4 Jan 2012 04:08:46 +0100 Subject: [PATCH] lavf: Fix try_decode_frame() so it doesnt loop infinitely. Signed-off-by: Michael Niedermayer --- libavformat/utils.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index e8fefe6514..2eba3bafc1 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2273,6 +2273,8 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **option pkt.size -= ret; } } + if(!pkt.data && !got_picture) + return -1; return ret; }