aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-08-06 10:56:34 +0000
committerMichael Niedermayer <michaelni@gmx.at>2014-11-28 18:44:37 +0100
commitf7ed48938a3346e6493fa64bebc7ff242d2c9cfe (patch)
treeea4cc25c1a49d5d81277c35e3d12d7c09b3d956b
parent150ae7692efc5890b944699534904af378c06711 (diff)
downloadffmpeg-f7ed48938a3346e6493fa64bebc7ff242d2c9cfe.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.c3
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)