]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aasc.c
do not display par and dar if not available
[ffmpeg] / libavcodec / aasc.c
index 6c8e3166e4b8f2e0f586fbbca1f303333ead242c..62912a81ae7bf8502596027f79bacae35cb32d2a 100644 (file)
@@ -28,7 +28,6 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
 #include "avcodec.h"
 #include "dsputil.h"
 
@@ -47,12 +46,11 @@ typedef struct AascContext {
 
 static int aasc_decode_init(AVCodecContext *avctx)
 {
-    AascContext *s = (AascContext *)avctx->priv_data;
+    AascContext *s = avctx->priv_data;
 
     s->avctx = avctx;
 
     avctx->pix_fmt = PIX_FMT_BGR24;
-    avctx->has_b_frames = 0;
     s->frame.data[0] = NULL;
 
     return 0;
@@ -60,9 +58,9 @@ static int aasc_decode_init(AVCodecContext *avctx)
 
 static int aasc_decode_frame(AVCodecContext *avctx,
                               void *data, int *data_size,
-                              uint8_t *buf, int buf_size)
+                              const uint8_t *buf, int buf_size)
 {
-    AascContext *s = (AascContext *)avctx->priv_data;
+    AascContext *s = avctx->priv_data;
     int stream_ptr = 4;
     unsigned char rle_code;
     unsigned char stream_byte;
@@ -154,7 +152,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
 
 static int aasc_decode_end(AVCodecContext *avctx)
 {
-    AascContext *s = (AascContext *)avctx->priv_data;
+    AascContext *s = avctx->priv_data;
 
     /* release the last frame */
     if (s->frame.data[0])