summaryrefslogtreecommitdiff
path: root/libavcodec/cdgraphics.c
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:32:42 +0000
commitc7d9b473e28238d4a4ef1b7e8b42c1cca256da36 (patch)
treeb337c38d3625bbc5a811571514052b482d0eea08 /libavcodec/cdgraphics.c
parenta1599f3f7ea8478d1f6a95e59e3bc6bc86d5f812 (diff)
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
Diffstat (limited to 'libavcodec/cdgraphics.c')
-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)