aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-08-06 10:56:34 +0000
committerAnton Khirnov <anton@khirnov.net>2014-08-06 18:41:44 +0000
commit18f48e05a22a73a389fb3ab4b3eaf78903bab5ef (patch)
treee0267089f1a190240770f4afa9ca5b53882cbab3 /libavcodec
parent5bf5a35fb5d452ea4b30cd7b853d92df6705d250 (diff)
downloadffmpeg-18f48e05a22a73a389fb3ab4b3eaf78903bab5ef.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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cdgraphics.c3
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)