]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/xan.c
g726dec: set channel layout at initialization instead of validating it
[ffmpeg] / libavcodec / xan.c
index 4c4721ada270ed853c1ba919838231b67b73e2dc..e6bfc0da068bc604fba5f17d49c8d1c32f0bea2a 100644 (file)
 #include <string.h>
 
 #include "libavutil/intreadwrite.h"
+#include "libavutil/mem.h"
 #include "avcodec.h"
 #include "bytestream.h"
 #define BITSTREAM_READER_LE
 #include "get_bits.h"
-// for av_memcpy_backptr
-#include "libavutil/lzo.h"
 
 #define RUNTIME_GAMMA 0
 
@@ -79,7 +78,7 @@ static av_cold int xan_decode_init(AVCodecContext *avctx)
     s->avctx = avctx;
     s->frame_size = 0;
 
-    avctx->pix_fmt = PIX_FMT_PAL8;
+    avctx->pix_fmt = AV_PIX_FMT_PAL8;
 
     s->buffer1_size = avctx->width * avctx->height;
     s->buffer1 = av_malloc(s->buffer1_size);
@@ -500,7 +499,7 @@ static int xan_decode_frame(AVCodecContext *avctx,
     int ret, buf_size = avpkt->size;
     XanContext *s = avctx->priv_data;
 
-    if (avctx->codec->id == CODEC_ID_XAN_WC3) {
+    if (avctx->codec->id == AV_CODEC_ID_XAN_WC3) {
         const uint8_t *buf_end = buf + buf_size;
         int tag = 0;
         while (buf_end - buf > 8 && tag != VGA__TAG) {
@@ -612,7 +611,7 @@ static av_cold int xan_decode_end(AVCodecContext *avctx)
 AVCodec ff_xan_wc3_decoder = {
     .name           = "xan_wc3",
     .type           = AVMEDIA_TYPE_VIDEO,
-    .id             = CODEC_ID_XAN_WC3,
+    .id             = AV_CODEC_ID_XAN_WC3,
     .priv_data_size = sizeof(XanContext),
     .init           = xan_decode_init,
     .close          = xan_decode_end,