[FFmpeg-cvslog] lavf: Fix try_decode_frame() so it doesnt loop infinitely.

Michael Niedermayer git at videolan.org
Wed Jan 4 05:04:10 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan  4 04:08:46 2012 +0100| [6072a19b4f311cb172d45e90daad90824e40e4b6] | committer: Michael Niedermayer

lavf: Fix try_decode_frame() so it doesnt loop infinitely.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/utils.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index e8fefe6..2eba3ba 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;
 }
 



More information about the ffmpeg-cvslog mailing list