]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/flashsv.c
Provide non null class name to avoid crash with ffmpeg -h.
[ffmpeg] / libavcodec / flashsv.c
index 515085c0288a4d4694cc4f1d501f36437808fdcb..842a7ccaf8bad956dd371217fc520d79938f7d10 100644 (file)
@@ -50,7 +50,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include "common.h"
 #include "avcodec.h"
 #include "bitstream.h"
 
@@ -82,7 +81,7 @@ static void copy_region(uint8_t *sptr, uint8_t *dptr,
 
 static int flashsv_decode_init(AVCodecContext *avctx)
 {
-    FlashSVContext *s = (FlashSVContext *)avctx->priv_data;
+    FlashSVContext *s = avctx->priv_data;
     int zret; // Zlib return code
 
     s->avctx = avctx;
@@ -103,9 +102,9 @@ static int flashsv_decode_init(AVCodecContext *avctx)
 
 static int flashsv_decode_frame(AVCodecContext *avctx,
                                     void *data, int *data_size,
-                                    uint8_t *buf, int buf_size)
+                                    const uint8_t *buf, int buf_size)
 {
-    FlashSVContext *s = (FlashSVContext *)avctx->priv_data;
+    FlashSVContext *s = avctx->priv_data;
     int h_blocks, v_blocks, h_part, v_part, i, j;
     GetBitContext gb;
 
@@ -231,7 +230,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx,
 
 static int flashsv_decode_end(AVCodecContext *avctx)
 {
-    FlashSVContext *s = (FlashSVContext *)avctx->priv_data;
+    FlashSVContext *s = avctx->priv_data;
     inflateEnd(&(s->zstream));
     /* release the frame if needed */
     if (s->frame.data[0])