From 238614de679a71970c20d7c3fee08a322967ec40 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 26 Jan 2013 22:02:19 +0100 Subject: 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. --- libavcodec/cdgraphics.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/cdgraphics.c') 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); -- cgit v1.2.3