cdgraphics: do not rely on get_buffer() initializing the frame.
[ffmpeg.git] / libavcodec / cdgraphics.c
index e4ed83b..9f402ca 100644 (file)
@@ -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);