diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-01-26 22:02:19 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-02-06 10:21:52 +0100 |
commit | 238614de679a71970c20d7c3fee08a322967ec40 (patch) | |
tree | 98c952907835213397ef8796625519c2dfe65e24 /libavcodec | |
parent | 6ed9fc44badb256bdf235e700702bee46a9f6527 (diff) | |
download | ffmpeg-238614de679a71970c20d7c3fee08a322967ec40.tar.gz |
cdgraphics: do not rely on get_buffer() initializing the frame.
Setting it to zero (instead of 128, as the default get_buffer() does)
also produces more correctly-looking output.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cdgraphics.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index e4ed83b9d4..9f402cae21 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -287,6 +287,8 @@ static int cdg_decode_frame(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n"); return ret; } + if (!avctx->frame_number) + memset(cc->frame.data[0], 0, cc->frame.linesize[0] * avctx->height); command = bytestream_get_byte(&buf); inst = bytestream_get_byte(&buf); |