]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/msrle.c
ivi_common: Initialize a variable at declaration in ff_ivi_decode_blocks().
[ffmpeg] / libavcodec / msrle.c
index 41f1fd8ebd19bd7ddcd6810779ad35328c55cf5a..06e9b494be070d79b116804b9c24700a7334cd15 100644 (file)
@@ -40,6 +40,7 @@ typedef struct MsrleContext {
     AVCodecContext *avctx;
     AVFrame frame;
 
+    GetByteContext gb;
     const unsigned char *buf;
     int size;
 
@@ -123,7 +124,8 @@ static int msrle_decode_frame(AVCodecContext *avctx,
             ptr += s->frame.linesize[0];
         }
     } else {
-        ff_msrle_decode(avctx, (AVPicture*)&s->frame, avctx->bits_per_coded_sample, buf, buf_size);
+        bytestream2_init(&s->gb, buf, buf_size);
+        ff_msrle_decode(avctx, (AVPicture*)&s->frame, avctx->bits_per_coded_sample, &s->gb);
     }
 
     *data_size = sizeof(AVFrame);
@@ -153,5 +155,5 @@ AVCodec ff_msrle_decoder = {
     .close          = msrle_decode_end,
     .decode         = msrle_decode_frame,
     .capabilities   = CODEC_CAP_DR1,
-    .long_name= NULL_IF_CONFIG_SMALL("Microsoft RLE"),
+    .long_name      = NULL_IF_CONFIG_SMALL("Microsoft RLE"),
 };