cdgraphics: set palette to zero too
authorPaul B Mahol <onemda@gmail.com>
Mon, 18 Feb 2013 16:37:32 +0000 (16:37 +0000)
committerPaul B Mahol <onemda@gmail.com>
Mon, 18 Feb 2013 16:38:06 +0000 (16:38 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/cdgraphics.c

index 6d957f3..202211d 100644 (file)
@@ -291,8 +291,10 @@ static int cdg_decode_frame(AVCodecContext *avctx,
         av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
         return ret;
     }
-    if (!avctx->frame_number)
+    if (!avctx->frame_number) {
         memset(cc->frame.data[0], 0, cc->frame.linesize[0] * avctx->height);
+        memset(cc->frame.data[1], 0, AVPALETTE_SIZE);
+    }
 
     command = bytestream_get_byte(&buf);
     inst    = bytestream_get_byte(&buf);