diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-08-06 10:56:34 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-08-06 18:32:42 +0000 |
commit | c7d9b473e28238d4a4ef1b7e8b42c1cca256da36 (patch) | |
tree | b337c38d3625bbc5a811571514052b482d0eea08 | |
parent | a1599f3f7ea8478d1f6a95e59e3bc6bc86d5f812 (diff) | |
download | ffmpeg-c7d9b473e28238d4a4ef1b7e8b42c1cca256da36.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
-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 752003f434..c3e42e750a 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -349,10 +349,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) |