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:52:28 +0000 |
commit | cf6b2a0ad2b06aabf04bec4c7b19e78a560cd904 (patch) | |
tree | d8598b3cfc6227d0eaf34b7630f4102a0c4ed312 /libavcodec | |
parent | 3aebdffb010df025728d6c2af89642f9634aa806 (diff) | |
download | ffmpeg-cf6b2a0ad2b06aabf04bec4c7b19e78a560cd904.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: Anton Khirnov <anton@khirnov.net>
Conflicts:
libavcodec/cdgraphics.c
Diffstat (limited to 'libavcodec')
-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 dc2aa0784b..9ab00b4fac 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -348,11 +348,10 @@ static int cdg_decode_frame(AVCodecContext *avctx, *data_size = sizeof(AVFrame); } else { *data_size = 0; - buf_size = 0; } *(AVFrame *) data = cc->frame; - return buf_size; + return avpkt->size; } static av_cold int cdg_decode_end(AVCodecContext *avctx) |