diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-08-06 10:56:34 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-10 22:40:50 +0200 |
commit | a72b7286e6db0f5ffac386bb13fe6efe55fb0b12 (patch) | |
tree | 8ea04f3986d142f7ebdcc6ed6bab9a21d52b8852 | |
parent | 901e275697dee8a1512540d6d653e38a16103bfa (diff) | |
download | ffmpeg-a72b7286e6db0f5ffac386bb13fe6efe55fb0b12.tar.gz |
cdgraphics: do not return 0 from the decode function
0 means no data consumed, so it can trigger an infinite loop in the
caller.
CC:libav-stable@libav.org
(cherry picked from commit c7d9b473e28238d4a4ef1b7e8b42c1cca256da36)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/cdgraphics.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index b7a8fa7ba2..3c07fc726e 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -353,10 +353,9 @@ static int cdg_decode_frame(AVCodecContext *avctx, *got_frame = 1; } else { *got_frame = 0; - buf_size = 0; } - return buf_size; + return avpkt->size; } static av_cold int cdg_decode_end(AVCodecContext *avctx) |