aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-08-06 10:56:34 +0000
committerMichael Niedermayer <michaelni@gmx.at>2014-08-07 02:05:19 +0200
commitf712d3669e2eed4a57b0e4d85d2902a2036de89e (patch)
treedbf88fc7a4f9d66b87b7416ad2c61f0c4fc39629
parentca232ff9b0af13af68d58f7a7306092dc55409ac (diff)
downloadffmpeg-f712d3669e2eed4a57b0e4d85d2902a2036de89e.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) Conflicts: libavcodec/cdgraphics.c Merged-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 94ce6ae946..7405ba5343 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -361,11 +361,10 @@ static int cdg_decode_frame(AVCodecContext *avctx,
*got_frame = 1;
} else {
*got_frame = 0;
- buf_size = 0;
}
*(AVFrame *) data = cc->frame;
- return buf_size;
+ return avpkt->size;
}
static av_cold int cdg_decode_end(AVCodecContext *avctx)