]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/aasc.c
Make 8SVX codec names just a single word for consistency with other codec names.
[ffmpeg] / libavcodec / aasc.c
index 6c8e3166e4b8f2e0f586fbbca1f303333ead242c..1e599e0daa889528f76c4526acbdc70ef5051d05 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Autodesc RLE Decoder
+ * Autodesk RLE Decoder
  * Copyright (C) 2005 the ffmpeg project
  *
  * This file is part of FFmpeg.
 
 /**
  * @file aasc.c
- * Autodesc RLE Video Decoder by Konstantin Shishkov
+ * Autodesk RLE Video Decoder by Konstantin Shishkov
  */
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "common.h"
 #include "avcodec.h"
 #include "dsputil.h"
 
@@ -45,14 +44,13 @@ typedef struct AascContext {
     } \
     stream_byte = buf[stream_ptr++];
 
-static int aasc_decode_init(AVCodecContext *avctx)
+static av_cold 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;
@@ -152,9 +150,9 @@ static int aasc_decode_frame(AVCodecContext *avctx,
     return buf_size;
 }
 
-static int aasc_decode_end(AVCodecContext *avctx)
+static av_cold 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])
@@ -173,4 +171,5 @@ AVCodec aasc_decoder = {
     aasc_decode_end,
     aasc_decode_frame,
     CODEC_CAP_DR1,
+    .long_name = "Autodesk RLE",
 };