changeset 35715:8517826b0dbd

Replace CODEC_IDs their modern AV_-prefixed counterparts.
author diego
date Mon, 21 Jan 2013 19:44:53 +0000
parents fc36990b6ae5
children d0004e3bcbbc
files gui/util/bitmap.c libmpcodecs/ad_ffmpeg.c libmpcodecs/ad_spdif.c libmpcodecs/vd_ffmpeg.c libmpcodecs/vf_mcdeint.c libmpcodecs/vf_screenshot.c libmpcodecs/vf_uspp.c libmpcodecs/vf_zrmjpeg.c libmpdemux/demux_lavf.c libmpdemux/demux_rtp_codec.cpp libmpdemux/demuxer.c libmpdemux/mp_taglists.c libmpdemux/muxer_lavf.c libvo/jpeg_enc.c libvo/vo_png.c sub/av_sub.c
diffstat 16 files changed, 194 insertions(+), 192 deletions(-) [+]
line wrap: on
line diff
--- a/gui/util/bitmap.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/gui/util/bitmap.c	Mon Jan 21 19:44:53 2013 +0000
@@ -121,7 +121,7 @@
     }
 
     avcodec_register_all();
-    avcodec_open2(avctx, avcodec_find_decoder(CODEC_ID_PNG), NULL);
+    avcodec_open2(avctx, avcodec_find_decoder(AV_CODEC_ID_PNG), NULL);
 
     av_init_packet(&pkt);
     pkt.data = data;
--- a/libmpcodecs/ad_ffmpeg.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpcodecs/ad_ffmpeg.c	Mon Jan 21 19:44:53 2013 +0000
@@ -64,7 +64,7 @@
         // If the decoder uses the wrong number of channels all is lost anyway.
         // sh_audio->channels=sh_audio->wf->nChannels;
 
-        if (lavc_context->codec_id == CODEC_ID_AAC &&
+        if (lavc_context->codec_id == AV_CODEC_ID_AAC &&
             samplerate == 2*sh_audio->wf->nSamplesPerSec) {
             broken_srate = 1;
         } else if (sh_audio->wf->nSamplesPerSec)
--- a/libmpcodecs/ad_spdif.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpcodecs/ad_spdif.c	Mon Jan 21 19:44:53 2013 +0000
@@ -84,12 +84,12 @@
     static const struct {
         const char *name; enum CodecID id;
     } fmt_id_type[] = {
-        { "aac" , CODEC_ID_AAC    },
-        { "ac3" , CODEC_ID_AC3    },
-        { "dca" , CODEC_ID_DTS    },
-        { "eac3", CODEC_ID_EAC3   },
-        { "mpa" , CODEC_ID_MP3    },
-        { "thd" , CODEC_ID_TRUEHD },
+        { "aac" , AV_CODEC_ID_AAC    },
+        { "ac3" , AV_CODEC_ID_AC3    },
+        { "dca" , AV_CODEC_ID_DTS    },
+        { "eac3", AV_CODEC_ID_EAC3   },
+        { "mpa" , AV_CODEC_ID_MP3    },
+        { "thd" , AV_CODEC_ID_TRUEHD },
         { NULL  , 0 }
     };
     AVFormatContext     *lavf_ctx  = NULL;
@@ -160,21 +160,21 @@
     sh->ds->buffer_pos -= in_size;
 
     switch (lavf_ctx->streams[0]->codec->codec_id) {
-    case CODEC_ID_AAC:
+    case AV_CODEC_ID_AAC:
         spdif_ctx->iec61937_packet_size = 16384;
         sh->sample_format               = AF_FORMAT_IEC61937_LE;
         sh->samplerate                  = srate;
         sh->channels                    = 2;
         sh->i_bps                       = bps;
         break;
-    case CODEC_ID_AC3:
+    case AV_CODEC_ID_AC3:
         spdif_ctx->iec61937_packet_size = 6144;
         sh->sample_format               = AF_FORMAT_AC3_LE;
         sh->samplerate                  = srate;
         sh->channels                    = 2;
         sh->i_bps                       = bps;
         break;
-    case CODEC_ID_DTS: // FORCE USE DTS-HD
+    case AV_CODEC_ID_DTS: // FORCE USE DTS-HD
         opt = av_opt_find(&lavf_ctx->oformat->priv_class,
                           "dtshd_rate", NULL, 0, 0);
         if (!opt)
@@ -188,21 +188,21 @@
         sh->channels                    = 2*4;
         sh->i_bps                       = bps;
         break;
-    case CODEC_ID_EAC3:
+    case AV_CODEC_ID_EAC3:
         spdif_ctx->iec61937_packet_size = 24576;
         sh->sample_format               = AF_FORMAT_IEC61937_LE;
         sh->samplerate                  = 192000;
         sh->channels                    = 2;
         sh->i_bps                       = bps;
         break;
-    case CODEC_ID_MP3:
+    case AV_CODEC_ID_MP3:
         spdif_ctx->iec61937_packet_size = 4608;
         sh->sample_format               = AF_FORMAT_MPEG2;
         sh->samplerate                  = srate;
         sh->channels                    = 2;
         sh->i_bps                       = bps;
         break;
-    case CODEC_ID_TRUEHD:
+    case AV_CODEC_ID_TRUEHD:
         spdif_ctx->iec61937_packet_size = 61440;
         sh->sample_format               = AF_FORMAT_IEC61937_LE;
         sh->samplerate                  = 192000;
--- a/libmpcodecs/vd_ffmpeg.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Mon Jan 21 19:44:53 2013 +0000
@@ -247,12 +247,14 @@
     if(use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug)
         ctx->do_slices=1;
 
-    if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_VP8)
+    if (lavc_codec->capabilities & CODEC_CAP_DR1 && !do_vis_debug &&
+        lavc_codec->id != AV_CODEC_ID_INTERPLAY_VIDEO &&
+        lavc_codec->id != AV_CODEC_ID_VP8)
         ctx->do_dr1=1;
     // TODO: fix and enable again. This currently causes issues when using filters
     // and seeking, usually failing with the "Ran out of numbered images" message,
     // but bugzilla #2118 might be related as well.
-    //ctx->nonref_dr = lavc_codec->id == CODEC_ID_H264;
+    //ctx->nonref_dr = lavc_codec->id == AV_CODEC_ID_H264;
     ctx->ip_count= ctx->b_count= 0;
 
     ctx->pic = avcodec_alloc_frame();
@@ -897,7 +899,7 @@
 //--
 
     if(!got_picture) {
-	if (avctx->codec->id == CODEC_ID_H264 &&
+        if (avctx->codec->id == AV_CODEC_ID_H264 &&
 	    skip_frame <= AVDISCARD_DEFAULT)
 	    return &mpi_no_picture; // H.264 first field only
 	else
--- a/libmpcodecs/vf_mcdeint.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpcodecs/vf_mcdeint.c	Mon Jan 21 19:44:53 2013 +0000
@@ -183,7 +183,7 @@
         int width, int height, int d_width, int d_height,
         unsigned int flags, unsigned int outfmt){
         int i;
-        AVCodec *enc= avcodec_find_encoder(CODEC_ID_SNOW);
+        AVCodec *enc= avcodec_find_encoder(AV_CODEC_ID_SNOW);
 
         for(i=0; i<3; i++){
             AVCodecContext *avctx_enc;
--- a/libmpcodecs/vf_screenshot.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpcodecs/vf_screenshot.c	Mon Jan 21 19:44:53 2013 +0000
@@ -301,7 +301,7 @@
     vf->priv->avctx = avcodec_alloc_context3(NULL);
     vf->priv->avctx->pix_fmt = PIX_FMT_RGB24;
     avcodec_register_all();
-    if (avcodec_open2(vf->priv->avctx, avcodec_find_encoder(CODEC_ID_PNG), NULL)) {
+    if (avcodec_open2(vf->priv->avctx, avcodec_find_encoder(AV_CODEC_ID_PNG), NULL)) {
         mp_msg(MSGT_VFILTER, MSGL_FATAL, "Could not open libavcodec PNG encoder\n");
         return 0;
     }
--- a/libmpcodecs/vf_uspp.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpcodecs/vf_uspp.c	Mon Jan 21 19:44:53 2013 +0000
@@ -212,7 +212,7 @@
         int width, int height, int d_width, int d_height,
         unsigned int flags, unsigned int outfmt){
         int i;
-        AVCodec *enc= avcodec_find_encoder(CODEC_ID_SNOW);
+        AVCodec *enc= avcodec_find_encoder(AV_CODEC_ID_SNOW);
 
         for(i=0; i<3; i++){
             int is_chroma= !!i;
--- a/libmpcodecs/vf_zrmjpeg.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpcodecs/vf_zrmjpeg.c	Mon Jan 21 19:44:53 2013 +0000
@@ -489,7 +489,7 @@
 
 	// Set some a minimum amount of default values that are needed
 	// Indicates that we should generated normal MJPEG
-	j->s->avctx->codec_id = CODEC_ID_MJPEG;
+	j->s->avctx->codec_id = AV_CODEC_ID_MJPEG;
 	// Which DCT method to use. AUTO will select the fastest one
 	j->s->avctx->dct_algo = FF_DCT_AUTO;
 	j->s->intra_quant_bias= 1<<(QUANT_BIAS_SHIFT-1); //(a + x/2)/x
--- a/libmpdemux/demux_lavf.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpdemux/demux_lavf.c	Mon Jan 21 19:44:53 2013 +0000
@@ -322,20 +322,20 @@
             sh_audio->samplerate= codec->sample_rate;
             sh_audio->i_bps= codec->bit_rate/8;
             switch (codec->codec_id) {
-                case CODEC_ID_PCM_S8:
-                case CODEC_ID_PCM_U8:
+                case AV_CODEC_ID_PCM_S8:
+                case AV_CODEC_ID_PCM_U8:
                     sh_audio->samplesize = 1;
                     break;
-                case CODEC_ID_PCM_S16LE:
-                case CODEC_ID_PCM_S16BE:
-                case CODEC_ID_PCM_U16LE:
-                case CODEC_ID_PCM_U16BE:
+                case AV_CODEC_ID_PCM_S16LE:
+                case AV_CODEC_ID_PCM_S16BE:
+                case AV_CODEC_ID_PCM_U16LE:
+                case AV_CODEC_ID_PCM_U16BE:
                     sh_audio->samplesize = 2;
                     break;
-                case CODEC_ID_PCM_ALAW:
+                case AV_CODEC_ID_PCM_ALAW:
                     sh_audio->format = 0x6;
                     break;
-                case CODEC_ID_PCM_MULAW:
+                case AV_CODEC_ID_PCM_MULAW:
                     sh_audio->format = 0x7;
                     break;
             }
@@ -363,7 +363,7 @@
             priv->vstreams[priv->video_streams] = i;
             bih=calloc(sizeof(*bih) + codec->extradata_size,1);
 
-            if(codec->codec_id == CODEC_ID_RAWVIDEO) {
+            if (codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
                 switch (codec->pix_fmt) {
                     case PIX_FMT_RGB24:
                         codec->codec_tag= MKTAG(24, 'B', 'G', 'R');
@@ -433,25 +433,25 @@
         case AVMEDIA_TYPE_SUBTITLE:{
             sh_sub_t* sh_sub;
             char type;
-            if(codec->codec_id == CODEC_ID_TEXT ||
-               codec->codec_id == AV_CODEC_ID_SUBRIP)
+            if (codec->codec_id == AV_CODEC_ID_TEXT ||
+                codec->codec_id == AV_CODEC_ID_SUBRIP)
                 type = 't';
-            else if(codec->codec_id == CODEC_ID_MOV_TEXT)
+            else if (codec->codec_id == AV_CODEC_ID_MOV_TEXT)
                 type = 'm';
-            else if(codec->codec_id == CODEC_ID_SSA)
+            else if (codec->codec_id == AV_CODEC_ID_SSA)
                 type = 'a';
-            else if(codec->codec_id == CODEC_ID_DVD_SUBTITLE)
+            else if (codec->codec_id == AV_CODEC_ID_DVD_SUBTITLE)
                 type = 'v';
-            else if(codec->codec_id == CODEC_ID_XSUB)
+            else if (codec->codec_id == AV_CODEC_ID_XSUB)
                 type = 'x';
-            else if(codec->codec_id == CODEC_ID_DVB_SUBTITLE)
+            else if (codec->codec_id == AV_CODEC_ID_DVB_SUBTITLE)
                 type = 'b';
-            else if(codec->codec_id == CODEC_ID_DVB_TELETEXT)
+            else if (codec->codec_id == AV_CODEC_ID_DVB_TELETEXT)
                 type = 'd';
-            else if(codec->codec_id == CODEC_ID_HDMV_PGS_SUBTITLE)
+            else if (codec->codec_id == AV_CODEC_ID_HDMV_PGS_SUBTITLE)
                 type = 'p';
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 14, 100)
-            else if(codec->codec_id == CODEC_ID_EIA_608)
+            else if (codec->codec_id == AV_CODEC_ID_EIA_608)
                 type = 'c';
 #endif
             else if(codec->codec_tag == MKTAG('c', '6', '0', '8'))
@@ -476,7 +476,7 @@
             break;
         }
         case AVMEDIA_TYPE_ATTACHMENT:{
-            if (st->codec->codec_id == CODEC_ID_TTF) {
+            if (st->codec->codec_id == AV_CODEC_ID_TTF) {
                 AVDictionaryEntry *fnametag = av_dict_get(st->metadata, "filename", NULL, 0);
                 demuxer_add_attachment(demuxer, fnametag ? fnametag->value : NULL,
                                        "application/x-truetype-font",
--- a/libmpdemux/demux_rtp_codec.cpp	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpdemux/demux_rtp_codec.cpp	Mon Jan 21 19:44:53 2013 +0000
@@ -140,7 +140,7 @@
     int fooLen;
     const uint8_t* fooData;
     avcodec_register_all();
-    h264parserctx = av_parser_init(CODEC_ID_H264);
+    h264parserctx = av_parser_init(AV_CODEC_ID_H264);
     avcctx = avcodec_alloc_context3(NULL);
     // Pass the config to the parser
     h264parserctx->parser->parser_parse(h264parserctx, avcctx,
--- a/libmpdemux/demuxer.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpdemux/demuxer.c	Mon Jan 21 19:44:53 2013 +0000
@@ -476,33 +476,33 @@
 #ifdef CONFIG_FFMPEG
 static void allocate_parser(AVCodecContext **avctx, AVCodecParserContext **parser, unsigned format)
 {
-    enum CodecID codec_id = CODEC_ID_NONE;
+    enum CodecID codec_id = AV_CODEC_ID_NONE;
 
     init_avcodec();
 
     switch (format) {
     case 0x1600:
     case MKTAG('M', 'P', '4', 'A'):
-        codec_id = CODEC_ID_AAC;
+        codec_id = AV_CODEC_ID_AAC;
         break;
     case 0x1602:
     case MKTAG('M', 'P', '4', 'L'):
-        codec_id = CODEC_ID_AAC_LATM;
+        codec_id = AV_CODEC_ID_AAC_LATM;
         break;
     case 0x2000:
     case 0x332D6361:
     case 0x332D4341:
     case 0x20736D:
     case MKTAG('s', 'a', 'c', '3'):
-        codec_id = CODEC_ID_AC3;
+        codec_id = AV_CODEC_ID_AC3;
         break;
     case MKTAG('d', 'n', 'e', 't'):
         // DNET/byte-swapped AC-3 - there is no parser for that yet
-        //codec_id = CODEC_ID_DNET;
+        //codec_id = AV_CODEC_ID_DNET;
         break;
     case MKTAG('E', 'A', 'C', '3'):
     case MKTAG('e', 'c', '-', '3'):
-        codec_id = CODEC_ID_EAC3;
+        codec_id = AV_CODEC_ID_EAC3;
         break;
     case 0x2001:
     case 0x86:
@@ -510,13 +510,13 @@
     case MKTAG('d', 't', 's', ' '):
     case MKTAG('d', 't', 's', 'b'):
     case MKTAG('d', 't', 's', 'c'):
-        codec_id = CODEC_ID_DTS;
+        codec_id = AV_CODEC_ID_DTS;
         break;
     case MKTAG('f', 'L', 'a', 'C'):
-        codec_id = CODEC_ID_FLAC;
+        codec_id = AV_CODEC_ID_FLAC;
         break;
     case MKTAG('M', 'L', 'P', ' '):
-        codec_id = CODEC_ID_MLP;
+        codec_id = AV_CODEC_ID_MLP;
         break;
     case 0x55:
     case 0x5500736d:
@@ -524,19 +524,19 @@
     case MKTAG('.', 'm', 'p', '3'):
     case MKTAG('M', 'P', '3', ' '):
     case MKTAG('L', 'A', 'M', 'E'):
-        codec_id = CODEC_ID_MP3;
+        codec_id = AV_CODEC_ID_MP3;
         break;
     case 0x50:
     case 0x5000736d:
     case MKTAG('.', 'm', 'p', '2'):
     case MKTAG('.', 'm', 'p', '1'):
-        codec_id = CODEC_ID_MP2;
+        codec_id = AV_CODEC_ID_MP2;
         break;
     case MKTAG('T', 'R', 'H', 'D'):
-        codec_id = CODEC_ID_TRUEHD;
+        codec_id = AV_CODEC_ID_TRUEHD;
         break;
     }
-    if (codec_id != CODEC_ID_NONE) {
+    if (codec_id != AV_CODEC_ID_NONE) {
         *avctx = avcodec_alloc_context3(NULL);
         if (!*avctx)
             return;
--- a/libmpdemux/mp_taglists.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpdemux/mp_taglists.c	Mon Jan 21 19:44:53 2013 +0000
@@ -27,102 +27,102 @@
 #include "libavformat/internal.h"
 
 static const struct AVCodecTag mp_wav_tags[] = {
-    { CODEC_ID_ADPCM_4XM,         MKTAG('4', 'X', 'M', 'A')},
-    { CODEC_ID_ADPCM_ADX,         MKTAG('S', 'a', 'd', 'x')},
+    { AV_CODEC_ID_ADPCM_4XM,         MKTAG('4', 'X', 'M', 'A') },
+    { AV_CODEC_ID_ADPCM_ADX,         MKTAG('S', 'a', 'd', 'x') },
 #if LIBAVUTIL_VERSION_MICRO >= 100
-    { AV_CODEC_ID_ADPCM_AFC,      MKTAG('A', 'F', 'C', ' ')},
+    { AV_CODEC_ID_ADPCM_AFC,         MKTAG('A', 'F', 'C', ' ') },
 #endif
-    { CODEC_ID_ADPCM_IMA_APC,     MKTAG('A', 'P', 'C', 'A')},
-    { CODEC_ID_ADPCM_EA,          MKTAG('A', 'D', 'E', 'A')},
-    { CODEC_ID_ADPCM_EA_R1,       MKTAG('E', 'A', 'R', '1')},
-    { CODEC_ID_ADPCM_EA_R2,       MKTAG('E', 'A', 'R', '2')},
-    { CODEC_ID_ADPCM_EA_R3,       MKTAG('E', 'A', 'R', '3')},
-    { CODEC_ID_ADPCM_EA_MAXIS_XA, MKTAG('A', 'D', 'X', 'A')},
-    { CODEC_ID_ADPCM_IMA_EA_EACS, MKTAG('E', 'A', 'C', 'S')},
-    { CODEC_ID_ADPCM_IMA_ISS,     MKTAG('A', 'I', 'S', 'S')},
-    { CODEC_ID_ADPCM_IMA_WS,      MKTAG('A', 'I', 'W', 'S')},
-    { CODEC_ID_ADPCM_THP,         MKTAG('T', 'H', 'P', 'A')},
-    { CODEC_ID_ADPCM_XA,          MKTAG('P', 'S', 'X', 'A')},
-    { CODEC_ID_AMR_NB,            MKTAG('n', 'b',   0,   0)},
-    { CODEC_ID_ATRAC1,            MKTAG('A', 'T', 'R', '1')},
-    { CODEC_ID_BINKAUDIO_DCT,     MKTAG('B', 'A', 'U', '1')},
-    { CODEC_ID_BINKAUDIO_RDFT,    MKTAG('B', 'A', 'U', '2')},
-    { CODEC_ID_BMV_AUDIO,         MKTAG('B', 'M', 'V', 'A')},
-    { CODEC_ID_COOK,              MKTAG('c', 'o', 'o', 'k')},
-    { CODEC_ID_DSICINAUDIO,       MKTAG('D', 'C', 'I', 'A')},
-    { CODEC_ID_EAC3,              MKTAG('E', 'A', 'C', '3')},
+    { AV_CODEC_ID_ADPCM_IMA_APC,     MKTAG('A', 'P', 'C', 'A') },
+    { AV_CODEC_ID_ADPCM_EA,          MKTAG('A', 'D', 'E', 'A') },
+    { AV_CODEC_ID_ADPCM_EA_R1,       MKTAG('E', 'A', 'R', '1') },
+    { AV_CODEC_ID_ADPCM_EA_R2,       MKTAG('E', 'A', 'R', '2') },
+    { AV_CODEC_ID_ADPCM_EA_R3,       MKTAG('E', 'A', 'R', '3') },
+    { AV_CODEC_ID_ADPCM_EA_MAXIS_XA, MKTAG('A', 'D', 'X', 'A') },
+    { AV_CODEC_ID_ADPCM_IMA_EA_EACS, MKTAG('E', 'A', 'C', 'S') },
+    { AV_CODEC_ID_ADPCM_IMA_ISS,     MKTAG('A', 'I', 'S', 'S') },
+    { AV_CODEC_ID_ADPCM_IMA_WS,      MKTAG('A', 'I', 'W', 'S') },
+    { AV_CODEC_ID_ADPCM_THP,         MKTAG('T', 'H', 'P', 'A') },
+    { AV_CODEC_ID_ADPCM_XA,          MKTAG('P', 'S', 'X', 'A') },
+    { AV_CODEC_ID_AMR_NB,            MKTAG('n', 'b',   0,   0) },
+    { AV_CODEC_ID_ATRAC1,            MKTAG('A', 'T', 'R', '1') },
+    { AV_CODEC_ID_BINKAUDIO_DCT,     MKTAG('B', 'A', 'U', '1') },
+    { AV_CODEC_ID_BINKAUDIO_RDFT,    MKTAG('B', 'A', 'U', '2') },
+    { AV_CODEC_ID_BMV_AUDIO,         MKTAG('B', 'M', 'V', 'A') },
+    { AV_CODEC_ID_COOK,              MKTAG('c', 'o', 'o', 'k') },
+    { AV_CODEC_ID_DSICINAUDIO,       MKTAG('D', 'C', 'I', 'A') },
+    { AV_CODEC_ID_EAC3,              MKTAG('E', 'A', 'C', '3') },
 #if LIBAVUTIL_VERSION_MICRO >= 100
-    { CODEC_ID_FFWAVESYNTH,       MKTAG('F', 'F', 'W', 'S')},
+    { AV_CODEC_ID_FFWAVESYNTH,       MKTAG('F', 'F', 'W', 'S') },
 #endif
-    { CODEC_ID_G723_1,            MKTAG('7', '2', '3', '1')},
-    { CODEC_ID_INTERPLAY_DPCM,    MKTAG('I', 'N', 'P', 'A')},
-    { AV_CODEC_ID_ILBC,           MKTAG('i', 'l', 'b', 'c')},
-    { CODEC_ID_MLP,               MKTAG('M', 'L', 'P', ' ')},
-    { CODEC_ID_MP1,               0x50},
-    { CODEC_ID_MP4ALS,            MKTAG('A', 'L', 'S', ' ')},
-    { CODEC_ID_MUSEPACK7,         MKTAG('M', 'P', 'C', ' ')},
-    { CODEC_ID_MUSEPACK8,         MKTAG('M', 'P', 'C', '8')},
-    { CODEC_ID_NELLYMOSER,        MKTAG('n', 'm', 'o', 's')},
-    { CODEC_ID_OPUS,              MKTAG('o', 'p', 'u', 's')},
-    { CODEC_ID_PCM_LXF,           MKTAG('P', 'L', 'X', 'F')},
-    { CODEC_ID_PCM_S16LE_PLANAR,  MKTAG('1', '6', 'P', 'L')},
-    { CODEC_ID_QCELP,             MKTAG('Q', 'c', 'l', 'p')},
-    { CODEC_ID_QDM2,              MKTAG('Q', 'D', 'M', '2')},
-    { CODEC_ID_RA_144,            MKTAG('1', '4', '_', '4')},
-    { CODEC_ID_RA_288,            MKTAG('2', '8', '_', '8')},
-    { CODEC_ID_ROQ_DPCM,          MKTAG('R', 'o', 'Q', 'A')},
-    { CODEC_ID_SHORTEN,           MKTAG('s', 'h', 'r', 'n')},
-    { CODEC_ID_SPEEX,             MKTAG('s', 'p', 'x', ' ')},
-    { AV_CODEC_ID_TAK,            MKTAG('T', 'A', 'K', ' ')},
-    { CODEC_ID_TTA,               MKTAG('T', 'T', 'A', '1')},
-    { CODEC_ID_TWINVQ,            MKTAG('T', 'W', 'I', '2')},
+    { AV_CODEC_ID_G723_1,            MKTAG('7', '2', '3', '1') },
+    { AV_CODEC_ID_INTERPLAY_DPCM,    MKTAG('I', 'N', 'P', 'A') },
+    { AV_CODEC_ID_ILBC,              MKTAG('i', 'l', 'b', 'c') },
+    { AV_CODEC_ID_MLP,               MKTAG('M', 'L', 'P', ' ') },
+    { AV_CODEC_ID_MP1,               0x50 },
+    { AV_CODEC_ID_MP4ALS,            MKTAG('A', 'L', 'S', ' ') },
+    { AV_CODEC_ID_MUSEPACK7,         MKTAG('M', 'P', 'C', ' ') },
+    { AV_CODEC_ID_MUSEPACK8,         MKTAG('M', 'P', 'C', '8') },
+    { AV_CODEC_ID_NELLYMOSER,        MKTAG('n', 'm', 'o', 's') },
+    { AV_CODEC_ID_OPUS,              MKTAG('o', 'p', 'u', 's') },
+    { AV_CODEC_ID_PCM_LXF,           MKTAG('P', 'L', 'X', 'F') },
+    { AV_CODEC_ID_PCM_S16LE_PLANAR,  MKTAG('1', '6', 'P', 'L') },
+    { AV_CODEC_ID_QCELP,             MKTAG('Q', 'c', 'l', 'p') },
+    { AV_CODEC_ID_QDM2,              MKTAG('Q', 'D', 'M', '2') },
+    { AV_CODEC_ID_RA_144,            MKTAG('1', '4', '_', '4') },
+    { AV_CODEC_ID_RA_288,            MKTAG('2', '8', '_', '8') },
+    { AV_CODEC_ID_ROQ_DPCM,          MKTAG('R', 'o', 'Q', 'A') },
+    { AV_CODEC_ID_SHORTEN,           MKTAG('s', 'h', 'r', 'n') },
+    { AV_CODEC_ID_SPEEX,             MKTAG('s', 'p', 'x', ' ') },
+    { AV_CODEC_ID_TAK,               MKTAG('T', 'A', 'K', ' ') },
+    { AV_CODEC_ID_TTA,               MKTAG('T', 'T', 'A', '1') },
+    { AV_CODEC_ID_TWINVQ,            MKTAG('T', 'W', 'I', '2') },
 #if LIBAVUTIL_VERSION_MICRO >= 100
-    { CODEC_ID_VIMA,              MKTAG('V', 'I', 'M', 'A')},
+    { AV_CODEC_ID_VIMA,              MKTAG('V', 'I', 'M', 'A') },
 #endif
-    { CODEC_ID_VMDAUDIO,          MKTAG('V', 'M', 'D', 'A')},
-    { CODEC_ID_WAVPACK,           MKTAG('W', 'V', 'P', 'K')},
-    { CODEC_ID_WESTWOOD_SND1,     MKTAG('S', 'N', 'D', '1')},
-    { CODEC_ID_XAN_DPCM,          MKTAG('A', 'x', 'a', 'n')},
+    { AV_CODEC_ID_VMDAUDIO,          MKTAG('V', 'M', 'D', 'A') },
+    { AV_CODEC_ID_WAVPACK,           MKTAG('W', 'V', 'P', 'K') },
+    { AV_CODEC_ID_WESTWOOD_SND1,     MKTAG('S', 'N', 'D', '1') },
+    { AV_CODEC_ID_XAN_DPCM,          MKTAG('A', 'x', 'a', 'n') },
     { 0, 0 },
 };
 
 static const struct AVCodecTag mp_codecid_override_tags[] = {
-    { CODEC_ID_8SVX_EXP,          MKTAG('8', 'e', 'x', 'p')},
-    { CODEC_ID_8SVX_FIB,          MKTAG('8', 'f', 'i', 'b')},
-    { MKBETAG('8','S','V','X'),   MKTAG('8', 'r', 'a', 'w')},
-    { CODEC_ID_AAC,               MKTAG('M', 'P', '4', 'A')},
-    { CODEC_ID_AAC_LATM,          MKTAG('M', 'P', '4', 'L')},
-    { CODEC_ID_AC3,               0x2000},
-    { CODEC_ID_ADPCM_IMA_EA_SEAD, MKTAG('S', 'E', 'A', 'D')},
-    { CODEC_ID_ADPCM_IMA_AMV,     MKTAG('A', 'M', 'V', 'A')},
-    { CODEC_ID_DTS,               0x2001},
-    { CODEC_ID_DVVIDEO,           MKTAG('d', 'v', 's', 'd')},
-    { CODEC_ID_EAC3,              MKTAG('E', 'A', 'C', '3')},
-    { CODEC_ID_ESCAPE124,         MKTAG('E', '1', '2', '4')},
+    { AV_CODEC_ID_8SVX_EXP,          MKTAG('8', 'e', 'x', 'p') },
+    { AV_CODEC_ID_8SVX_FIB,          MKTAG('8', 'f', 'i', 'b') },
+    { MKBETAG('8','S','V','X'),      MKTAG('8', 'r', 'a', 'w') },
+    { AV_CODEC_ID_AAC,               MKTAG('M', 'P', '4', 'A') },
+    { AV_CODEC_ID_AAC_LATM,          MKTAG('M', 'P', '4', 'L') },
+    { AV_CODEC_ID_AC3,               0x2000 },
+    { AV_CODEC_ID_ADPCM_IMA_EA_SEAD, MKTAG('S', 'E', 'A', 'D') },
+    { AV_CODEC_ID_ADPCM_IMA_AMV,     MKTAG('A', 'M', 'V', 'A') },
+    { AV_CODEC_ID_DTS,               0x2001 },
+    { AV_CODEC_ID_DVVIDEO,           MKTAG('d', 'v', 's', 'd') },
+    { AV_CODEC_ID_EAC3,              MKTAG('E', 'A', 'C', '3') },
+    { AV_CODEC_ID_ESCAPE124,         MKTAG('E', '1', '2', '4') },
 #if LIBAVUTIL_VERSION_MICRO >= 100
-    { CODEC_ID_ESCAPE130,         MKTAG('E', '1', '3', '0')},
+    { AV_CODEC_ID_ESCAPE130,         MKTAG('E', '1', '3', '0') },
 #endif
-    { CODEC_ID_FLV1,              MKTAG('F', 'L', 'V', '1')},
-    { CODEC_ID_G729,              MKTAG('G', '7', '2', '9')},
-    { CODEC_ID_H264,              MKTAG('H', '2', '6', '4')},
-    { CODEC_ID_MP3,               0x55},
-    { CODEC_ID_MPEG4,             MKTAG('M', 'P', '4', 'V')},
+    { AV_CODEC_ID_FLV1,              MKTAG('F', 'L', 'V', '1') },
+    { AV_CODEC_ID_G729,              MKTAG('G', '7', '2', '9') },
+    { AV_CODEC_ID_H264,              MKTAG('H', '2', '6', '4') },
+    { AV_CODEC_ID_MP3,               0x55 },
+    { AV_CODEC_ID_MPEG4,             MKTAG('M', 'P', '4', 'V') },
 #if LIBAVUTIL_VERSION_MICRO >= 100
-    { CODEC_ID_PAF_AUDIO,         MKTAG('P', 'A', 'F', 'A')},
-    { CODEC_ID_PAF_VIDEO,         MKTAG('P', 'A', 'F', 'V')},
+    { AV_CODEC_ID_PAF_AUDIO,         MKTAG('P', 'A', 'F', 'A') },
+    { AV_CODEC_ID_PAF_VIDEO,         MKTAG('P', 'A', 'F', 'V') },
 #endif
-    { CODEC_ID_PCM_BLURAY,        MKTAG('B', 'P', 'C', 'M')},
-    { CODEC_ID_PCM_S8,            MKTAG('t', 'w', 'o', 's')},
-    { CODEC_ID_PCM_U8,            1},
-    { CODEC_ID_PCM_S16BE,         MKTAG('t', 'w', 'o', 's')},
-    { CODEC_ID_PCM_S16LE,         1},
-    { CODEC_ID_PCM_S24BE,         MKTAG('i', 'n', '2', '4')},
-    { CODEC_ID_PCM_S24LE,         1},
-    { CODEC_ID_PCM_S32BE,         MKTAG('i', 'n', '3', '2')},
-    { CODEC_ID_PCM_S32LE,         1},
-    { CODEC_ID_MP2,               0x50},
-    { CODEC_ID_MPEG2VIDEO,        MKTAG('M', 'P', 'G', '2')},
-    { CODEC_ID_TRUEHD,            MKTAG('T', 'R', 'H', 'D')},
+    { AV_CODEC_ID_PCM_BLURAY,        MKTAG('B', 'P', 'C', 'M') },
+    { AV_CODEC_ID_PCM_S8,            MKTAG('t', 'w', 'o', 's') },
+    { AV_CODEC_ID_PCM_U8,            1 },
+    { AV_CODEC_ID_PCM_S16BE,         MKTAG('t', 'w', 'o', 's') },
+    { AV_CODEC_ID_PCM_S16LE,         1 },
+    { AV_CODEC_ID_PCM_S24BE,         MKTAG('i', 'n', '2', '4') },
+    { AV_CODEC_ID_PCM_S24LE,         1 },
+    { AV_CODEC_ID_PCM_S32BE,         MKTAG('i', 'n', '3', '2') },
+    { AV_CODEC_ID_PCM_S32LE,         1 },
+    { AV_CODEC_ID_MP2,               0x50 },
+    { AV_CODEC_ID_MPEG2VIDEO,        MKTAG('M', 'P', 'G', '2') },
+    { AV_CODEC_ID_TRUEHD,            MKTAG('T', 'R', 'H', 'D') },
     { 0, 0 },
 };
 
@@ -130,57 +130,57 @@
                         {mp_codecid_override_tags, 0};
 
 static const struct AVCodecTag mp_bmp_tags[] = {
-    { CODEC_ID_AMV,               MKTAG('A', 'M', 'V', 'V')},
-    { CODEC_ID_ANM,               MKTAG('A', 'N', 'M', ' ')},
-    { CODEC_ID_ANSI,              MKTAG('T', 'X', 'T', '4')},
-    { CODEC_ID_AVS,               MKTAG('A', 'V', 'S', ' ')},
-    { CODEC_ID_BETHSOFTVID,       MKTAG('B', 'E', 'T', 'H')},
-    { CODEC_ID_BFI,               MKTAG('B', 'F', 'I', 'V')},
-    { CODEC_ID_BMP,               MKTAG('b', 'm', 'p', ' ')},
-    { CODEC_ID_BMV_VIDEO,         MKTAG('B', 'M', 'V', 'V')},
-    { CODEC_ID_C93,               MKTAG('C', '9', '3', 'V')},
-    { CODEC_ID_CDGRAPHICS,        MKTAG('C', 'D', 'G', 'R')},
-    { CODEC_ID_CDXL,              MKTAG('C', 'D', 'X', 'L')},
-    { CODEC_ID_CMV,               MKTAG('M', 'V', 'I', 'f')},
-    { CODEC_ID_DFA,               MKTAG('C', 'D', 'F', 'A')},
-    { CODEC_ID_DNXHD,             MKTAG('A', 'V', 'd', 'n')},
-    { CODEC_ID_DSICINVIDEO,       MKTAG('D', 'C', 'I', 'V')},
-    { CODEC_ID_DXA,               MKTAG('D', 'X', 'A', '1')},
-    { CODEC_ID_FLIC,              MKTAG('f', 'l', 'i', 'c')},
-    { CODEC_ID_IDCIN,             MKTAG('I', 'D', 'C', 'I')},
-    { CODEC_ID_INTERPLAY_VIDEO,   MKTAG('I', 'N', 'P', 'V')},
-    { CODEC_ID_JV,                MKTAG('F', 'F', 'J', 'V')},
-    { CODEC_ID_MAD,               MKTAG('M', 'A', 'D', 'k')},
-    { CODEC_ID_MDEC,              MKTAG('M', 'D', 'E', 'C')},
-    { CODEC_ID_MMVIDEO,           MKTAG('M', 'M', 'V', ' ')},
-    { CODEC_ID_MOTIONPIXELS,      MKTAG('M', 'V', 'I', '1')},
+    { AV_CODEC_ID_AMV,               MKTAG('A', 'M', 'V', 'V') },
+    { AV_CODEC_ID_ANM,               MKTAG('A', 'N', 'M', ' ') },
+    { AV_CODEC_ID_ANSI,              MKTAG('T', 'X', 'T', '4') },
+    { AV_CODEC_ID_AVS,               MKTAG('A', 'V', 'S', ' ') },
+    { AV_CODEC_ID_BETHSOFTVID,       MKTAG('B', 'E', 'T', 'H') },
+    { AV_CODEC_ID_BFI,               MKTAG('B', 'F', 'I', 'V') },
+    { AV_CODEC_ID_BMP,               MKTAG('b', 'm', 'p', ' ') },
+    { AV_CODEC_ID_BMV_VIDEO,         MKTAG('B', 'M', 'V', 'V') },
+    { AV_CODEC_ID_C93,               MKTAG('C', '9', '3', 'V') },
+    { AV_CODEC_ID_CDGRAPHICS,        MKTAG('C', 'D', 'G', 'R') },
+    { AV_CODEC_ID_CDXL,              MKTAG('C', 'D', 'X', 'L') },
+    { AV_CODEC_ID_CMV,               MKTAG('M', 'V', 'I', 'f') },
+    { AV_CODEC_ID_DFA,               MKTAG('C', 'D', 'F', 'A') },
+    { AV_CODEC_ID_DNXHD,             MKTAG('A', 'V', 'd', 'n') },
+    { AV_CODEC_ID_DSICINVIDEO,       MKTAG('D', 'C', 'I', 'V') },
+    { AV_CODEC_ID_DXA,               MKTAG('D', 'X', 'A', '1') },
+    { AV_CODEC_ID_FLIC,              MKTAG('f', 'l', 'i', 'c') },
+    { AV_CODEC_ID_IDCIN,             MKTAG('I', 'D', 'C', 'I') },
+    { AV_CODEC_ID_INTERPLAY_VIDEO,   MKTAG('I', 'N', 'P', 'V') },
+    { AV_CODEC_ID_JV,                MKTAG('F', 'F', 'J', 'V') },
+    { AV_CODEC_ID_MAD,               MKTAG('M', 'A', 'D', 'k') },
+    { AV_CODEC_ID_MDEC,              MKTAG('M', 'D', 'E', 'C') },
+    { AV_CODEC_ID_MMVIDEO,           MKTAG('M', 'M', 'V', ' ') },
+    { AV_CODEC_ID_MOTIONPIXELS,      MKTAG('M', 'V', 'I', '1') },
 #if LIBAVUTIL_VERSION_MICRO >= 100
-    { AV_CODEC_ID_MVC1,           MKTAG('m', 'v', 'c', '1')},
-    { AV_CODEC_ID_MVC2,           MKTAG('m', 'v', 'c', '2')},
+    { AV_CODEC_ID_MVC1,              MKTAG('m', 'v', 'c', '1') },
+    { AV_CODEC_ID_MVC2,              MKTAG('m', 'v', 'c', '2') },
 #endif
-    { CODEC_ID_MXPEG,             MKTAG('M', 'X', 'P', 'G')},
-    { CODEC_ID_NUV,               MKTAG('N', 'U', 'V', '1')},
-    { CODEC_ID_RL2,               MKTAG('R', 'L', '2', 'V')},
-    { CODEC_ID_ROQ,               MKTAG('R', 'o', 'Q', 'V')},
-    { CODEC_ID_RV10,              MKTAG('R', 'V', '1', '0')},
-    { CODEC_ID_RV20,              MKTAG('R', 'V', '2', '0')},
-    { CODEC_ID_RV30,              MKTAG('R', 'V', '3', '0')},
-    { CODEC_ID_RV40,              MKTAG('R', 'V', '4', '0')},
+    { AV_CODEC_ID_MXPEG,             MKTAG('M', 'X', 'P', 'G') },
+    { AV_CODEC_ID_NUV,               MKTAG('N', 'U', 'V', '1') },
+    { AV_CODEC_ID_RL2,               MKTAG('R', 'L', '2', 'V') },
+    { AV_CODEC_ID_ROQ,               MKTAG('R', 'o', 'Q', 'V') },
+    { AV_CODEC_ID_RV10,              MKTAG('R', 'V', '1', '0') },
+    { AV_CODEC_ID_RV20,              MKTAG('R', 'V', '2', '0') },
+    { AV_CODEC_ID_RV30,              MKTAG('R', 'V', '3', '0') },
+    { AV_CODEC_ID_RV40,              MKTAG('R', 'V', '4', '0') },
 #if LIBAVUTIL_VERSION_MICRO >= 100
-    { CODEC_ID_SANM,              MKTAG('S', 'A', 'N', 'M')},
-    { AV_CODEC_ID_SGIRLE,         MKTAG('r', 'l', 'e', '1')},
+    { AV_CODEC_ID_SANM,              MKTAG('S', 'A', 'N', 'M') },
+    { AV_CODEC_ID_SGIRLE,            MKTAG('r', 'l', 'e', '1') },
 #endif
-    { CODEC_ID_SVQ3,              MKTAG('S', 'V', 'Q', '3')},
-    { CODEC_ID_TMV,               MKTAG('t', 'm', 'v', '8')},
-    { CODEC_ID_TGV,               MKTAG('f', 'V', 'G', 'T')},
-    { CODEC_ID_THP,               MKTAG('T', 'H', 'P', 'V')},
-    { CODEC_ID_TIERTEXSEQVIDEO,   MKTAG('T', 'S', 'E', 'Q')},
-    { CODEC_ID_TXD,               MKTAG('T', 'X', 'D', 'V')},
-    { CODEC_ID_VP6A,              MKTAG('V', 'P', '6', 'A')},
-    { CODEC_ID_VMDVIDEO,          MKTAG('V', 'M', 'D', 'V')},
-    { CODEC_ID_WS_VQA,            MKTAG('V', 'Q', 'A', 'V')},
-    { CODEC_ID_XAN_WC3,           MKTAG('W', 'C', '3', 'V')},
-    { CODEC_ID_YOP,               MKTAG('Y', 'O', 'P', '1')},
+    { AV_CODEC_ID_SVQ3,              MKTAG('S', 'V', 'Q', '3') },
+    { AV_CODEC_ID_TMV,               MKTAG('t', 'm', 'v', '8') },
+    { AV_CODEC_ID_TGV,               MKTAG('f', 'V', 'G', 'T') },
+    { AV_CODEC_ID_THP,               MKTAG('T', 'H', 'P', 'V') },
+    { AV_CODEC_ID_TIERTEXSEQVIDEO,   MKTAG('T', 'S', 'E', 'Q') },
+    { AV_CODEC_ID_TXD,               MKTAG('T', 'X', 'D', 'V') },
+    { AV_CODEC_ID_VP6A,              MKTAG('V', 'P', '6', 'A') },
+    { AV_CODEC_ID_VMDVIDEO,          MKTAG('V', 'M', 'D', 'V') },
+    { AV_CODEC_ID_WS_VQA,            MKTAG('V', 'Q', 'A', 'V') },
+    { AV_CODEC_ID_XAN_WC3,           MKTAG('W', 'C', '3', 'V') },
+    { AV_CODEC_ID_YOP,               MKTAG('Y', 'O', 'P', '1') },
     { 0, 0 },
 };
 
@@ -201,7 +201,7 @@
 uint32_t mp_codec_id2tag(enum CodecID codec_id, uint32_t old_tag, int audio)
 {
     const struct AVCodecTag *taglists[3];
-    // For some formats (like PCM) always trust CODEC_ID_* more than codec_tag
+    // For some formats (like PCM) always trust AV_CODEC_ID_* more than codec_tag
     uint32_t tag = av_codec_get_tag(mp_codecid_override_taglists, codec_id);
     if (tag)
         return tag;
--- a/libmpdemux/muxer_lavf.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libmpdemux/muxer_lavf.c	Mon Jan 21 19:44:53 2013 +0000
@@ -155,7 +155,7 @@
 	spriv->avstream->id = 1;
 
 	ctx = spriv->avstream->codec;
-	ctx->codec_id = CODEC_ID_NONE;
+	ctx->codec_id = AV_CODEC_ID_NONE;
 	switch(type)
 	{
 		case MUXER_TYPE_VIDEO:
--- a/libvo/jpeg_enc.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libvo/jpeg_enc.c	Mon Jan 21 19:44:53 2013 +0000
@@ -330,7 +330,7 @@
 	/* alloc bogus avctx to keep MPV_common_init from segfaulting */
 	j->s->avctx = calloc(sizeof(*j->s->avctx), 1);
 	/* Set up to encode mjpeg */
-	j->s->avctx->codec_id = CODEC_ID_MJPEG;
+	j->s->avctx->codec_id = AV_CODEC_ID_MJPEG;
 
 	/* make MPV_common_init allocate important buffers, like s->block */
 	j->s->avctx->thread_count = 1;
--- a/libvo/vo_png.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/libvo/vo_png.c	Mon Jan 21 19:44:53 2013 +0000
@@ -133,7 +133,7 @@
         avctx = avcodec_alloc_context3(NULL);
         avctx->compression_level = z_compression;
         avctx->pix_fmt = imgfmt2pixfmt(format);
-        if (avcodec_open2(avctx, avcodec_find_encoder(CODEC_ID_PNG), NULL) < 0) {
+        if (avcodec_open2(avctx, avcodec_find_encoder(AV_CODEC_ID_PNG), NULL) < 0) {
             uninit();
             return -1;
         }
--- a/sub/av_sub.c	Mon Jan 21 19:44:49 2013 +0000
+++ b/sub/av_sub.c	Mon Jan 21 19:44:53 2013 +0000
@@ -84,7 +84,7 @@
                  double *pts, double *endpts)
 {
     AVCodecContext *ctx = sh->context;
-    enum CodecID cid = CODEC_ID_NONE;
+    enum CodecID cid = AV_CODEC_ID_NONE;
     int new_type = 0;
     int res;
     int got_sub;
@@ -93,11 +93,11 @@
 
     switch (sh->type) {
     case 'b':
-        cid = CODEC_ID_DVB_SUBTITLE; break;
+        cid = AV_CODEC_ID_DVB_SUBTITLE; break;
     case 'p':
-        cid = CODEC_ID_HDMV_PGS_SUBTITLE; break;
+        cid = AV_CODEC_ID_HDMV_PGS_SUBTITLE; break;
     case 'x':
-        cid = CODEC_ID_XSUB; break;
+        cid = AV_CODEC_ID_XSUB; break;
     }
 
     av_init_packet(&pkt);