[FFmpeg-cvslog] r22735 - in trunk: cmdutils.c cmdutils.h ffmpeg.c ffplay.c ffprobe.c ffserver.c libavcodec/4xm.c libavcodec/8bps.c libavcodec/8svx.c libavcodec/aac.c libavcodec/aacenc.c libavcodec/aasc.c libavcode...

stefano subversion
Wed Mar 31 01:30:56 CEST 2010


Author: stefano
Date: Wed Mar 31 01:30:55 2010
New Revision: 22735

Log:
Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Modified:
   trunk/cmdutils.c
   trunk/cmdutils.h
   trunk/ffmpeg.c
   trunk/ffplay.c
   trunk/ffprobe.c
   trunk/ffserver.c
   trunk/libavcodec/4xm.c
   trunk/libavcodec/8bps.c
   trunk/libavcodec/8svx.c
   trunk/libavcodec/aac.c
   trunk/libavcodec/aacenc.c
   trunk/libavcodec/aasc.c
   trunk/libavcodec/ac3dec.c
   trunk/libavcodec/ac3enc.c
   trunk/libavcodec/adpcm.c
   trunk/libavcodec/adxdec.c
   trunk/libavcodec/adxenc.c
   trunk/libavcodec/alac.c
   trunk/libavcodec/alacenc.c
   trunk/libavcodec/alsdec.c
   trunk/libavcodec/amrnbdec.c
   trunk/libavcodec/anm.c
   trunk/libavcodec/apedec.c
   trunk/libavcodec/asv1.c
   trunk/libavcodec/atrac1.c
   trunk/libavcodec/atrac3.c
   trunk/libavcodec/aura.c
   trunk/libavcodec/avcodec.h
   trunk/libavcodec/avs.c
   trunk/libavcodec/bethsoftvideo.c
   trunk/libavcodec/bfi.c
   trunk/libavcodec/bink.c
   trunk/libavcodec/binkaudio.c
   trunk/libavcodec/bmp.c
   trunk/libavcodec/bmpenc.c
   trunk/libavcodec/c93.c
   trunk/libavcodec/cavsdec.c
   trunk/libavcodec/cdgraphics.c
   trunk/libavcodec/cinepak.c
   trunk/libavcodec/cljr.c
   trunk/libavcodec/cook.c
   trunk/libavcodec/cscd.c
   trunk/libavcodec/cyuv.c
   trunk/libavcodec/dca.c
   trunk/libavcodec/dnxhddec.c
   trunk/libavcodec/dnxhdenc.c
   trunk/libavcodec/dpcm.c
   trunk/libavcodec/dpx.c
   trunk/libavcodec/dsicinav.c
   trunk/libavcodec/dv.c
   trunk/libavcodec/dvbsub.c
   trunk/libavcodec/dvbsubdec.c
   trunk/libavcodec/dvdsubdec.c
   trunk/libavcodec/dvdsubenc.c
   trunk/libavcodec/dxa.c
   trunk/libavcodec/dxva2_h264.c
   trunk/libavcodec/dxva2_vc1.c
   trunk/libavcodec/eacmv.c
   trunk/libavcodec/eamad.c
   trunk/libavcodec/eatgq.c
   trunk/libavcodec/eatgv.c
   trunk/libavcodec/eatqi.c
   trunk/libavcodec/escape124.c
   trunk/libavcodec/ffv1.c
   trunk/libavcodec/flacdec.c
   trunk/libavcodec/flacenc.c
   trunk/libavcodec/flashsv.c
   trunk/libavcodec/flashsvenc.c
   trunk/libavcodec/flicvideo.c
   trunk/libavcodec/flvdec.c
   trunk/libavcodec/flvenc.c
   trunk/libavcodec/fraps.c
   trunk/libavcodec/frwu.c
   trunk/libavcodec/g726.c
   trunk/libavcodec/g729dec.c
   trunk/libavcodec/gif.c
   trunk/libavcodec/gifdec.c
   trunk/libavcodec/h261dec.c
   trunk/libavcodec/h261enc.c
   trunk/libavcodec/h263dec.c
   trunk/libavcodec/h264.c
   trunk/libavcodec/huffyuv.c
   trunk/libavcodec/idcinvideo.c
   trunk/libavcodec/iff.c
   trunk/libavcodec/imc.c
   trunk/libavcodec/indeo2.c
   trunk/libavcodec/indeo3.c
   trunk/libavcodec/indeo5.c
   trunk/libavcodec/intelh263dec.c
   trunk/libavcodec/interplayvideo.c
   trunk/libavcodec/jpeglsdec.c
   trunk/libavcodec/jpeglsenc.c
   trunk/libavcodec/kgv1dec.c
   trunk/libavcodec/kmvc.c
   trunk/libavcodec/lcldec.c
   trunk/libavcodec/lclenc.c
   trunk/libavcodec/libdiracdec.c
   trunk/libavcodec/libdiracenc.c
   trunk/libavcodec/libfaac.c
   trunk/libavcodec/libfaad.c
   trunk/libavcodec/libgsm.c
   trunk/libavcodec/libmp3lame.c
   trunk/libavcodec/libopencore-amr.c
   trunk/libavcodec/libopenjpeg.c
   trunk/libavcodec/libschroedingerdec.c
   trunk/libavcodec/libschroedingerenc.c
   trunk/libavcodec/libspeexdec.c
   trunk/libavcodec/libtheoraenc.c
   trunk/libavcodec/libvorbis.c
   trunk/libavcodec/libx264.c
   trunk/libavcodec/libxvidff.c
   trunk/libavcodec/ljpegenc.c
   trunk/libavcodec/loco.c
   trunk/libavcodec/mace.c
   trunk/libavcodec/mdec.c
   trunk/libavcodec/mimic.c
   trunk/libavcodec/mjpegbdec.c
   trunk/libavcodec/mjpegdec.c
   trunk/libavcodec/mjpegenc.c
   trunk/libavcodec/mlpdec.c
   trunk/libavcodec/mmvideo.c
   trunk/libavcodec/motionpixels.c
   trunk/libavcodec/mpc7.c
   trunk/libavcodec/mpc8.c
   trunk/libavcodec/mpeg12.c
   trunk/libavcodec/mpeg12enc.c
   trunk/libavcodec/mpeg4videodec.c
   trunk/libavcodec/mpeg4videoenc.c
   trunk/libavcodec/mpegaudiodec.c
   trunk/libavcodec/mpegaudioenc.c
   trunk/libavcodec/mpegvideo_enc.c
   trunk/libavcodec/msmpeg4.c
   trunk/libavcodec/msrle.c
   trunk/libavcodec/msvideo1.c
   trunk/libavcodec/nellymoserdec.c
   trunk/libavcodec/nellymoserenc.c
   trunk/libavcodec/nuv.c
   trunk/libavcodec/options.c
   trunk/libavcodec/pamenc.c
   trunk/libavcodec/pcm-mpeg.c
   trunk/libavcodec/pcm.c
   trunk/libavcodec/pcx.c
   trunk/libavcodec/pcxenc.c
   trunk/libavcodec/pgssubdec.c
   trunk/libavcodec/pngdec.c
   trunk/libavcodec/pngenc.c
   trunk/libavcodec/pnmdec.c
   trunk/libavcodec/pnmenc.c
   trunk/libavcodec/ptx.c
   trunk/libavcodec/qcelpdec.c
   trunk/libavcodec/qdm2.c
   trunk/libavcodec/qdrw.c
   trunk/libavcodec/qpeg.c
   trunk/libavcodec/qtrle.c
   trunk/libavcodec/qtrleenc.c
   trunk/libavcodec/r210dec.c
   trunk/libavcodec/ra144.c
   trunk/libavcodec/ra288.c
   trunk/libavcodec/rawdec.c
   trunk/libavcodec/rawenc.c
   trunk/libavcodec/rl2.c
   trunk/libavcodec/roqaudioenc.c
   trunk/libavcodec/roqvideodec.c
   trunk/libavcodec/roqvideoenc.c
   trunk/libavcodec/rpza.c
   trunk/libavcodec/rv10.c
   trunk/libavcodec/rv10enc.c
   trunk/libavcodec/rv20enc.c
   trunk/libavcodec/rv30.c
   trunk/libavcodec/rv40.c
   trunk/libavcodec/sgidec.c
   trunk/libavcodec/sgienc.c
   trunk/libavcodec/shorten.c
   trunk/libavcodec/sipr.c
   trunk/libavcodec/smacker.c
   trunk/libavcodec/smc.c
   trunk/libavcodec/snow.c
   trunk/libavcodec/sonic.c
   trunk/libavcodec/sp5xdec.c
   trunk/libavcodec/sunrast.c
   trunk/libavcodec/svq1dec.c
   trunk/libavcodec/svq1enc.c
   trunk/libavcodec/svq3.c
   trunk/libavcodec/targa.c
   trunk/libavcodec/targaenc.c
   trunk/libavcodec/tiertexseqv.c
   trunk/libavcodec/tiff.c
   trunk/libavcodec/tiffenc.c
   trunk/libavcodec/tmv.c
   trunk/libavcodec/truemotion1.c
   trunk/libavcodec/truemotion2.c
   trunk/libavcodec/truespeech.c
   trunk/libavcodec/tscc.c
   trunk/libavcodec/tta.c
   trunk/libavcodec/twinvq.c
   trunk/libavcodec/txd.c
   trunk/libavcodec/ulti.c
   trunk/libavcodec/utils.c
   trunk/libavcodec/v210dec.c
   trunk/libavcodec/v210enc.c
   trunk/libavcodec/v210x.c
   trunk/libavcodec/vaapi_h264.c
   trunk/libavcodec/vaapi_mpeg2.c
   trunk/libavcodec/vaapi_mpeg4.c
   trunk/libavcodec/vaapi_vc1.c
   trunk/libavcodec/vb.c
   trunk/libavcodec/vc1dec.c
   trunk/libavcodec/vcr1.c
   trunk/libavcodec/vmdav.c
   trunk/libavcodec/vmnc.c
   trunk/libavcodec/vorbis_dec.c
   trunk/libavcodec/vorbis_enc.c
   trunk/libavcodec/vp3.c
   trunk/libavcodec/vp5.c
   trunk/libavcodec/vp6.c
   trunk/libavcodec/vqavideo.c
   trunk/libavcodec/wavpack.c
   trunk/libavcodec/wmadec.c
   trunk/libavcodec/wmaenc.c
   trunk/libavcodec/wmaprodec.c
   trunk/libavcodec/wmavoice.c
   trunk/libavcodec/wmv2dec.c
   trunk/libavcodec/wmv2enc.c
   trunk/libavcodec/wnv1.c
   trunk/libavcodec/ws-snd1.c
   trunk/libavcodec/xan.c
   trunk/libavcodec/xl.c
   trunk/libavcodec/xsubdec.c
   trunk/libavcodec/xsubenc.c
   trunk/libavcodec/yop.c
   trunk/libavcodec/zmbv.c
   trunk/libavcodec/zmbvenc.c
   trunk/libavdevice/alsa-audio-dec.c
   trunk/libavdevice/bktr.c
   trunk/libavdevice/jack_audio.c
   trunk/libavdevice/libdc1394.c
   trunk/libavdevice/oss_audio.c
   trunk/libavdevice/v4l.c
   trunk/libavdevice/v4l2.c
   trunk/libavdevice/vfwcap.c
   trunk/libavdevice/x11grab.c
   trunk/libavfilter/avfilter.h
   trunk/libavfilter/vf_aspect.c
   trunk/libavfilter/vf_crop.c
   trunk/libavfilter/vf_format.c
   trunk/libavfilter/vf_null.c
   trunk/libavfilter/vf_scale.c
   trunk/libavfilter/vf_slicify.c
   trunk/libavfilter/vf_vflip.c
   trunk/libavfilter/vsink_nullsink.c
   trunk/libavfilter/vsrc_nullsrc.c
   trunk/libavformat/4xm.c
   trunk/libavformat/aea.c
   trunk/libavformat/aiffdec.c
   trunk/libavformat/amr.c
   trunk/libavformat/anm.c
   trunk/libavformat/apc.c
   trunk/libavformat/ape.c
   trunk/libavformat/asfdec.c
   trunk/libavformat/asfenc.c
   trunk/libavformat/assdec.c
   trunk/libavformat/au.c
   trunk/libavformat/audiointerleave.c
   trunk/libavformat/avformat.h
   trunk/libavformat/avidec.c
   trunk/libavformat/avienc.c
   trunk/libavformat/avisynth.c
   trunk/libavformat/avs.c
   trunk/libavformat/bethsoftvid.c
   trunk/libavformat/bfi.c
   trunk/libavformat/bink.c
   trunk/libavformat/c93.c
   trunk/libavformat/cafdec.c
   trunk/libavformat/cdg.c
   trunk/libavformat/daud.c
   trunk/libavformat/dsicin.c
   trunk/libavformat/dv.c
   trunk/libavformat/dvenc.c
   trunk/libavformat/dxa.c
   trunk/libavformat/eacdata.c
   trunk/libavformat/electronicarts.c
   trunk/libavformat/ffmdec.c
   trunk/libavformat/ffmenc.c
   trunk/libavformat/filmstripdec.c
   trunk/libavformat/flacdec.c
   trunk/libavformat/flic.c
   trunk/libavformat/flvdec.c
   trunk/libavformat/flvenc.c
   trunk/libavformat/gif.c
   trunk/libavformat/gxf.c
   trunk/libavformat/gxfenc.c
   trunk/libavformat/idcin.c
   trunk/libavformat/idroq.c
   trunk/libavformat/iff.c
   trunk/libavformat/img2.c
   trunk/libavformat/ipmovie.c
   trunk/libavformat/iss.c
   trunk/libavformat/iv8.c
   trunk/libavformat/libnut.c
   trunk/libavformat/lmlm4.c
   trunk/libavformat/matroskadec.c
   trunk/libavformat/matroskaenc.c
   trunk/libavformat/mm.c
   trunk/libavformat/mmf.c
   trunk/libavformat/mov.c
   trunk/libavformat/movenc.c
   trunk/libavformat/mp3.c
   trunk/libavformat/mpc.c
   trunk/libavformat/mpc8.c
   trunk/libavformat/mpeg.c
   trunk/libavformat/mpegenc.c
   trunk/libavformat/mpegts.c
   trunk/libavformat/mpegtsenc.c
   trunk/libavformat/msnwc_tcp.c
   trunk/libavformat/mtv.c
   trunk/libavformat/mvi.c
   trunk/libavformat/mxf.c
   trunk/libavformat/mxfdec.c
   trunk/libavformat/mxfenc.c
   trunk/libavformat/ncdec.c
   trunk/libavformat/nsvdec.c
   trunk/libavformat/nutdec.c
   trunk/libavformat/nutenc.c
   trunk/libavformat/nuv.c
   trunk/libavformat/oggdec.c
   trunk/libavformat/oggenc.c
   trunk/libavformat/oggparsedirac.c
   trunk/libavformat/oggparseflac.c
   trunk/libavformat/oggparseogm.c
   trunk/libavformat/oggparseskeleton.c
   trunk/libavformat/oggparsespeex.c
   trunk/libavformat/oggparsetheora.c
   trunk/libavformat/oggparsevorbis.c
   trunk/libavformat/oma.c
   trunk/libavformat/output-example.c
   trunk/libavformat/psxstr.c
   trunk/libavformat/pva.c
   trunk/libavformat/qcp.c
   trunk/libavformat/r3d.c
   trunk/libavformat/raw.c
   trunk/libavformat/rdt.c
   trunk/libavformat/riff.c
   trunk/libavformat/rl2.c
   trunk/libavformat/rmdec.c
   trunk/libavformat/rmenc.c
   trunk/libavformat/rpl.c
   trunk/libavformat/rtp.c
   trunk/libavformat/rtp.h
   trunk/libavformat/rtpdec.c
   trunk/libavformat/rtpdec.h
   trunk/libavformat/rtpdec_amr.c
   trunk/libavformat/rtpdec_asf.c
   trunk/libavformat/rtpdec_h263.c
   trunk/libavformat/rtpdec_h264.c
   trunk/libavformat/rtpdec_theora.c
   trunk/libavformat/rtpdec_vorbis.c
   trunk/libavformat/rtpenc.c
   trunk/libavformat/rtsp.c
   trunk/libavformat/sdp.c
   trunk/libavformat/segafilm.c
   trunk/libavformat/sierravmd.c
   trunk/libavformat/siff.c
   trunk/libavformat/smacker.c
   trunk/libavformat/sol.c
   trunk/libavformat/soxdec.c
   trunk/libavformat/swfdec.c
   trunk/libavformat/swfenc.c
   trunk/libavformat/thp.c
   trunk/libavformat/tiertexseq.c
   trunk/libavformat/tmv.c
   trunk/libavformat/tta.c
   trunk/libavformat/txd.c
   trunk/libavformat/utils.c
   trunk/libavformat/vc1test.c
   trunk/libavformat/vocdec.c
   trunk/libavformat/vocenc.c
   trunk/libavformat/vqf.c
   trunk/libavformat/wc3movie.c
   trunk/libavformat/westwood.c
   trunk/libavformat/wv.c
   trunk/libavformat/xa.c
   trunk/libavformat/yop.c
   trunk/libavformat/yuv4mpeg.c

Modified: trunk/cmdutils.c
==============================================================================
--- trunk/cmdutils.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/cmdutils.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -48,7 +48,7 @@
 
 const char **opt_names;
 static int opt_name_count;
-AVCodecContext *avcodec_opts[CODEC_TYPE_NB];
+AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
 AVFormatContext *avformat_opts;
 struct SwsContext *sws_opts;
 
@@ -191,7 +191,7 @@ int opt_default(const char *opt, const c
     const AVOption *o= NULL;
     int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
 
-    for(type=0; type<CODEC_TYPE_NB && ret>= 0; type++){
+    for(type=0; type<AVMEDIA_TYPE_NB && ret>= 0; type++){
         const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
         if(o2)
             ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
@@ -202,11 +202,11 @@ int opt_default(const char *opt, const c
         ret = av_set_string3(sws_opts, opt, arg, 1, &o);
     if(!o){
         if(opt[0] == 'a')
-            ret = av_set_string3(avcodec_opts[CODEC_TYPE_AUDIO], opt+1, arg, 1, &o);
+            ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
         else if(opt[0] == 'v')
-            ret = av_set_string3(avcodec_opts[CODEC_TYPE_VIDEO], opt+1, arg, 1, &o);
+            ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o);
         else if(opt[0] == 's')
-            ret = av_set_string3(avcodec_opts[CODEC_TYPE_SUBTITLE], opt+1, arg, 1, &o);
+            ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o);
     }
     if (o && ret < 0) {
         fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt);
@@ -535,13 +535,13 @@ void show_codecs(void)
         last_name= p2->name;
 
         switch(p2->type) {
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             type_str = "V";
             break;
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             type_str = "A";
             break;
-        case CODEC_TYPE_SUBTITLE:
+        case AVMEDIA_TYPE_SUBTITLE:
             type_str = "S";
             break;
         default:

Modified: trunk/cmdutils.h
==============================================================================
--- trunk/cmdutils.h	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/cmdutils.h	Wed Mar 31 01:30:55 2010	(r22735)
@@ -40,7 +40,7 @@ extern const int program_birth_year;
 extern const int this_year;
 
 extern const char **opt_names;
-extern AVCodecContext *avcodec_opts[CODEC_TYPE_NB];
+extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
 extern AVFormatContext *avformat_opts;
 extern struct SwsContext *sws_opts;
 

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/ffmpeg.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -452,7 +452,7 @@ static int av_exit(int ret)
     powerpc_display_perf_report();
 #endif /* CONFIG_POWERPC_PERF */
 
-    for (i=0;i<CODEC_TYPE_NB;i++)
+    for (i=0;i<AVMEDIA_TYPE_NB;i++)
         av_free(avcodec_opts[i]);
     av_free(avformat_opts);
     av_free(sws_opts);
@@ -527,9 +527,9 @@ static int read_ffserver_streams(AVForma
         memcpy(st->codec, ic->streams[i]->codec, sizeof(AVCodecContext));
         s->streams[i] = st;
 
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO && audio_stream_copy)
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && audio_stream_copy)
             st->stream_copy = 1;
-        else if (st->codec->codec_type == CODEC_TYPE_VIDEO && video_stream_copy)
+        else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && video_stream_copy)
             st->stream_copy = 1;
 
         if(!st->codec->thread_count)
@@ -967,7 +967,7 @@ static void do_video_out(AVFormatContext
     }else
         ost->sync_opts= lrintf(sync_ipts);
 
-    nb_frames= FFMIN(nb_frames, max_frames[CODEC_TYPE_VIDEO] - ost->frame_number);
+    nb_frames= FFMIN(nb_frames, max_frames[AVMEDIA_TYPE_VIDEO] - ost->frame_number);
     if (nb_frames <= 0)
         return;
 
@@ -1088,7 +1088,7 @@ static void do_video_out(AVFormatContext
             /* better than nothing: use input picture interlaced
                settings */
             big_picture.interlaced_frame = in_picture->interlaced_frame;
-            if(avcodec_opts[CODEC_TYPE_VIDEO]->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME)){
+            if(avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags & (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME)){
                 if(top_field_first == -1)
                     big_picture.top_field_first = in_picture->top_field_first;
                 else
@@ -1163,7 +1163,7 @@ static void do_video_stats(AVFormatConte
     }
 
     enc = ost->st->codec;
-    if (enc->codec_type == CODEC_TYPE_VIDEO) {
+    if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
         frame_number = ost->frame_number;
         fprintf(vstats_file, "frame= %5d q= %2.1f ", frame_number, enc->coded_frame->quality/(float)FF_QP2LAMBDA);
         if (enc->flags&CODEC_FLAG_PSNR)
@@ -1223,12 +1223,12 @@ static void print_report(AVFormatContext
     for(i=0;i<nb_ostreams;i++) {
         ost = ost_table[i];
         enc = ost->st->codec;
-        if (vid && enc->codec_type == CODEC_TYPE_VIDEO) {
+        if (vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) {
             snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "q=%2.1f ",
                      !ost->st->stream_copy ?
                      enc->coded_frame->quality/(float)FF_QP2LAMBDA : -1);
         }
-        if (!vid && enc->codec_type == CODEC_TYPE_VIDEO) {
+        if (!vid && enc->codec_type == AVMEDIA_TYPE_VIDEO) {
             float t = (av_gettime()-timer_start) / 1000000.0;
 
             frame_number = ost->frame_number;
@@ -1360,7 +1360,7 @@ static int output_packet(AVInputStream *
         subtitle_to_free = NULL;
         if (ist->decoding_needed) {
             switch(ist->st->codec->codec_type) {
-            case CODEC_TYPE_AUDIO:{
+            case AVMEDIA_TYPE_AUDIO:{
                 if(pkt && samples_size < FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE)) {
                     samples_size = FFMAX(pkt->size*sizeof(*samples), AVCODEC_MAX_AUDIO_FRAME_SIZE);
                     av_free(samples);
@@ -1386,7 +1386,7 @@ static int output_packet(AVInputStream *
                 ist->next_pts += ((int64_t)AV_TIME_BASE/bps * decoded_data_size) /
                     (ist->st->codec->sample_rate * ist->st->codec->channels);
                 break;}
-            case CODEC_TYPE_VIDEO:
+            case AVMEDIA_TYPE_VIDEO:
                     decoded_data_size = (ist->st->codec->width * ist->st->codec->height * 3) / 2;
                     /* XXX: allocate picture correctly */
                     avcodec_get_frame_defaults(&picture);
@@ -1408,7 +1408,7 @@ static int output_packet(AVInputStream *
                     }
                     avpkt.size = 0;
                     break;
-            case CODEC_TYPE_SUBTITLE:
+            case AVMEDIA_TYPE_SUBTITLE:
                 ret = avcodec_decode_subtitle2(ist->st->codec,
                                                &subtitle, &got_subtitle, &avpkt);
                 if (ret < 0)
@@ -1424,11 +1424,11 @@ static int output_packet(AVInputStream *
             }
         } else {
             switch(ist->st->codec->codec_type) {
-            case CODEC_TYPE_AUDIO:
+            case AVMEDIA_TYPE_AUDIO:
                 ist->next_pts += ((int64_t)AV_TIME_BASE * ist->st->codec->frame_size) /
                     ist->st->codec->sample_rate;
                 break;
-            case CODEC_TYPE_VIDEO:
+            case AVMEDIA_TYPE_VIDEO:
                 if (ist->st->codec->time_base.num != 0) {
                     int ticks= ist->st->parser ? ist->st->parser->repeat_pict+1 : ist->st->codec->ticks_per_frame;
                     ist->next_pts += ((int64_t)AV_TIME_BASE *
@@ -1442,13 +1442,13 @@ static int output_packet(AVInputStream *
         }
 
         buffer_to_free = NULL;
-        if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             pre_process_video_frame(ist, (AVPicture *)&picture,
                                     &buffer_to_free);
         }
 
         // preprocess audio (volume)
-        if (ist->st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (ist->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             if (audio_volume != 256) {
                 short *volp;
                 volp = samples;
@@ -1485,15 +1485,15 @@ static int output_packet(AVInputStream *
                     if (ost->encoding_needed) {
                         assert(ist->decoding_needed);
                         switch(ost->st->codec->codec_type) {
-                        case CODEC_TYPE_AUDIO:
+                        case AVMEDIA_TYPE_AUDIO:
                             do_audio_out(os, ost, ist, decoded_data_buf, decoded_data_size);
                             break;
-                        case CODEC_TYPE_VIDEO:
+                        case AVMEDIA_TYPE_VIDEO:
                             do_video_out(os, ost, ist, &picture, &frame_size);
                             if (vstats_filename && frame_size)
                                 do_video_stats(os, ost, frame_size);
                             break;
-                        case CODEC_TYPE_SUBTITLE:
+                        case AVMEDIA_TYPE_SUBTITLE:
                             do_subtitle_out(os, ost, ist, &subtitle,
                                             pkt->pts);
                             break;
@@ -1517,9 +1517,9 @@ static int output_packet(AVInputStream *
                         ost->st->codec->coded_frame= &avframe;
                         avframe.key_frame = pkt->flags & PKT_FLAG_KEY;
 
-                        if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO)
+                        if(ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
                             audio_size += data_size;
-                        else if (ost->st->codec->codec_type == CODEC_TYPE_VIDEO) {
+                        else if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
                             video_size += data_size;
                             ost->sync_opts++;
                         }
@@ -1583,9 +1583,9 @@ static int output_packet(AVInputStream *
                 AVCodecContext *enc= ost->st->codec;
                 os = output_files[ost->file_index];
 
-                if(ost->st->codec->codec_type == CODEC_TYPE_AUDIO && enc->frame_size <=1)
+                if(ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <=1)
                     continue;
-                if(ost->st->codec->codec_type == CODEC_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
+                if(ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE))
                     continue;
 
                 if (ost->encoding_needed) {
@@ -1596,7 +1596,7 @@ static int output_packet(AVInputStream *
                         pkt.stream_index= ost->index;
 
                         switch(ost->st->codec->codec_type) {
-                        case CODEC_TYPE_AUDIO:
+                        case AVMEDIA_TYPE_AUDIO:
                             fifo_bytes = av_fifo_size(ost->fifo);
                             ret = 0;
                             /* encode any samples remaining in fifo */
@@ -1629,7 +1629,7 @@ static int output_packet(AVInputStream *
                             audio_size += ret;
                             pkt.flags |= PKT_FLAG_KEY;
                             break;
-                        case CODEC_TYPE_VIDEO:
+                        case AVMEDIA_TYPE_VIDEO:
                             ret = avcodec_encode_video(enc, bit_buffer, bit_buffer_size, NULL);
                             if (ret < 0) {
                                 fprintf(stderr, "Video encoding failed\n");
@@ -1946,7 +1946,7 @@ static int av_encode(AVFormatContext **o
             }else
                 codec->time_base = ist->st->time_base;
             switch(codec->codec_type) {
-            case CODEC_TYPE_AUDIO:
+            case AVMEDIA_TYPE_AUDIO:
                 if(audio_volume != 256) {
                     fprintf(stderr,"-acodec copy and -vol are incompatible (frames are not decoded)\n");
                     av_exit(1);
@@ -1961,13 +1961,13 @@ static int av_encode(AVFormatContext **o
                 if(codec->codec_id == CODEC_ID_AC3)
                     codec->block_align= 0;
                 break;
-            case CODEC_TYPE_VIDEO:
+            case AVMEDIA_TYPE_VIDEO:
                 codec->pix_fmt = icodec->pix_fmt;
                 codec->width = icodec->width;
                 codec->height = icodec->height;
                 codec->has_b_frames = icodec->has_b_frames;
                 break;
-            case CODEC_TYPE_SUBTITLE:
+            case AVMEDIA_TYPE_SUBTITLE:
                 codec->width = icodec->width;
                 codec->height = icodec->height;
                 break;
@@ -1976,7 +1976,7 @@ static int av_encode(AVFormatContext **o
             }
         } else {
             switch(codec->codec_type) {
-            case CODEC_TYPE_AUDIO:
+            case AVMEDIA_TYPE_AUDIO:
                 ost->fifo= av_fifo_alloc(1024);
                 if(!ost->fifo)
                     goto fail;
@@ -1986,7 +1986,7 @@ static int av_encode(AVFormatContext **o
                 ist->decoding_needed = 1;
                 ost->encoding_needed = 1;
                 break;
-            case CODEC_TYPE_VIDEO:
+            case AVMEDIA_TYPE_VIDEO:
                 if (ost->st->codec->pix_fmt == PIX_FMT_NONE) {
                     fprintf(stderr, "Video pixel format is unknown, stream cannot be encoded\n");
                     av_exit(1);
@@ -2050,7 +2050,7 @@ static int av_encode(AVFormatContext **o
                 ost->encoding_needed = 1;
                 ist->decoding_needed = 1;
                 break;
-            case CODEC_TYPE_SUBTITLE:
+            case AVMEDIA_TYPE_SUBTITLE:
                 ost->encoding_needed = 1;
                 ist->decoding_needed = 1;
                 break;
@@ -2098,7 +2098,7 @@ static int av_encode(AVFormatContext **o
                 }
             }
         }
-        if(codec->codec_type == CODEC_TYPE_VIDEO){
+        if(codec->codec_type == AVMEDIA_TYPE_VIDEO){
             int size= codec->width * codec->height;
             bit_buffer_size= FFMAX(bit_buffer_size, 6*size + 200);
         }
@@ -2155,7 +2155,7 @@ static int av_encode(AVFormatContext **o
                 ret = AVERROR(EINVAL);
                 goto dump_format;
             }
-            //if (ist->st->codec->codec_type == CODEC_TYPE_VIDEO)
+            //if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
             //    ist->st->codec->flags |= CODEC_FLAG_REPEAT_FIELD;
         }
     }
@@ -2528,7 +2528,7 @@ static int opt_frame_rate(const char *op
 
 static int opt_bitrate(const char *opt, const char *arg)
 {
-    int codec_type = opt[0]=='a' ? CODEC_TYPE_AUDIO : CODEC_TYPE_VIDEO;
+    int codec_type = opt[0]=='a' ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO;
 
     opt_default(opt, arg);
 
@@ -2781,7 +2781,7 @@ static void opt_codec(int *pstream_copy,
 
 static void opt_audio_codec(const char *arg)
 {
-    opt_codec(&audio_stream_copy, &audio_codec_name, CODEC_TYPE_AUDIO, arg);
+    opt_codec(&audio_stream_copy, &audio_codec_name, AVMEDIA_TYPE_AUDIO, arg);
 }
 
 static void opt_audio_tag(const char *arg)
@@ -2804,12 +2804,12 @@ static void opt_video_tag(const char *ar
 
 static void opt_video_codec(const char *arg)
 {
-    opt_codec(&video_stream_copy, &video_codec_name, CODEC_TYPE_VIDEO, arg);
+    opt_codec(&video_stream_copy, &video_codec_name, AVMEDIA_TYPE_VIDEO, arg);
 }
 
 static void opt_subtitle_codec(const char *arg)
 {
-    opt_codec(&subtitle_stream_copy, &subtitle_codec_name, CODEC_TYPE_SUBTITLE, arg);
+    opt_codec(&subtitle_stream_copy, &subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, arg);
 }
 
 static void opt_subtitle_tag(const char *arg)
@@ -2965,9 +2965,9 @@ static void opt_input_file(const char *f
 
     set_context_opts(ic, avformat_opts, AV_OPT_FLAG_DECODING_PARAM);
 
-    ic->video_codec_id   = find_codec_or_die(video_codec_name   , CODEC_TYPE_VIDEO   , 0);
-    ic->audio_codec_id   = find_codec_or_die(audio_codec_name   , CODEC_TYPE_AUDIO   , 0);
-    ic->subtitle_codec_id= find_codec_or_die(subtitle_codec_name, CODEC_TYPE_SUBTITLE, 0);
+    ic->video_codec_id   = find_codec_or_die(video_codec_name   , AVMEDIA_TYPE_VIDEO   , 0);
+    ic->audio_codec_id   = find_codec_or_die(audio_codec_name   , AVMEDIA_TYPE_AUDIO   , 0);
+    ic->subtitle_codec_id= find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0);
     ic->flags |= AVFMT_FLAG_NONBLOCK;
 
     if(pgmyuv_compatibility_hack)
@@ -3035,8 +3035,8 @@ static void opt_input_file(const char *f
         AVCodecContext *enc = st->codec;
         avcodec_thread_init(enc, thread_count);
         switch(enc->codec_type) {
-        case CODEC_TYPE_AUDIO:
-            set_context_opts(enc, avcodec_opts[CODEC_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
+        case AVMEDIA_TYPE_AUDIO:
+            set_context_opts(enc, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
             //fprintf(stderr, "\nInput Audio channels: %d", enc->channels);
             channel_layout = enc->channel_layout;
             audio_channels = enc->channels;
@@ -3046,8 +3046,8 @@ static void opt_input_file(const char *f
             if(audio_disable)
                 st->discard= AVDISCARD_ALL;
             break;
-        case CODEC_TYPE_VIDEO:
-            set_context_opts(enc, avcodec_opts[CODEC_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
+        case AVMEDIA_TYPE_VIDEO:
+            set_context_opts(enc, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM);
             frame_height = enc->height;
             frame_width = enc->width;
             if(ic->streams[i]->sample_aspect_ratio.num)
@@ -3084,15 +3084,15 @@ static void opt_input_file(const char *f
             else if(video_discard)
                 st->discard= video_discard;
             break;
-        case CODEC_TYPE_DATA:
+        case AVMEDIA_TYPE_DATA:
             break;
-        case CODEC_TYPE_SUBTITLE:
+        case AVMEDIA_TYPE_SUBTITLE:
             input_codecs[nb_icodecs++] = avcodec_find_decoder_by_name(subtitle_codec_name);
             if(subtitle_disable)
                 st->discard = AVDISCARD_ALL;
             break;
-        case CODEC_TYPE_ATTACHMENT:
-        case CODEC_TYPE_UNKNOWN:
+        case AVMEDIA_TYPE_ATTACHMENT:
+        case AVMEDIA_TYPE_UNKNOWN:
             nb_icodecs++;
             break;
         default:
@@ -3129,18 +3129,18 @@ static void check_audio_video_sub_inputs
         for(i=0;i<ic->nb_streams;i++) {
             AVCodecContext *enc = ic->streams[i]->codec;
             switch(enc->codec_type) {
-            case CODEC_TYPE_AUDIO:
+            case AVMEDIA_TYPE_AUDIO:
                 has_audio = 1;
                 break;
-            case CODEC_TYPE_VIDEO:
+            case AVMEDIA_TYPE_VIDEO:
                 has_video = 1;
                 break;
-            case CODEC_TYPE_SUBTITLE:
+            case AVMEDIA_TYPE_SUBTITLE:
                 has_subtitle = 1;
                 break;
-            case CODEC_TYPE_DATA:
-            case CODEC_TYPE_ATTACHMENT:
-            case CODEC_TYPE_UNKNOWN:
+            case AVMEDIA_TYPE_DATA:
+            case AVMEDIA_TYPE_ATTACHMENT:
+            case AVMEDIA_TYPE_UNKNOWN:
                 break;
             default:
                 abort();
@@ -3163,7 +3163,7 @@ static void new_video_stream(AVFormatCon
         fprintf(stderr, "Could not alloc stream\n");
         av_exit(1);
     }
-    avcodec_get_context_defaults2(st->codec, CODEC_TYPE_VIDEO);
+    avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_VIDEO);
     bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters;
     video_bitstream_filters= NULL;
 
@@ -3177,16 +3177,16 @@ static void new_video_stream(AVFormatCon
     if(   (video_global_header&1)
        || (video_global_header==0 && (oc->oformat->flags & AVFMT_GLOBALHEADER))){
         video_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
-        avcodec_opts[CODEC_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
+        avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
     }
     if(video_global_header&2){
         video_enc->flags2 |= CODEC_FLAG2_LOCAL_HEADER;
-        avcodec_opts[CODEC_TYPE_VIDEO]->flags2|= CODEC_FLAG2_LOCAL_HEADER;
+        avcodec_opts[AVMEDIA_TYPE_VIDEO]->flags2|= CODEC_FLAG2_LOCAL_HEADER;
     }
 
     if (video_stream_copy) {
         st->stream_copy = 1;
-        video_enc->codec_type = CODEC_TYPE_VIDEO;
+        video_enc->codec_type = AVMEDIA_TYPE_VIDEO;
         video_enc->sample_aspect_ratio =
         st->sample_aspect_ratio = av_d2q(frame_aspect_ratio*frame_height/frame_width, 255);
     } else {
@@ -3196,17 +3196,17 @@ static void new_video_stream(AVFormatCon
         AVRational fps= frame_rate.num ? frame_rate : (AVRational){25,1};
 
         if (video_codec_name) {
-            codec_id = find_codec_or_die(video_codec_name, CODEC_TYPE_VIDEO, 1);
+            codec_id = find_codec_or_die(video_codec_name, AVMEDIA_TYPE_VIDEO, 1);
             codec = avcodec_find_encoder_by_name(video_codec_name);
             output_codecs[nb_ocodecs] = codec;
         } else {
-            codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_VIDEO);
+            codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_VIDEO);
             codec = avcodec_find_encoder(codec_id);
         }
 
         video_enc->codec_id = codec_id;
 
-        set_context_opts(video_enc, avcodec_opts[CODEC_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
+        set_context_opts(video_enc, avcodec_opts[AVMEDIA_TYPE_VIDEO], AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
 
         if (codec && codec->supported_framerates && !force_fps)
             fps = codec->supported_framerates[av_find_nearest_q_idx(fps, codec->supported_framerates)];
@@ -3300,7 +3300,7 @@ static void new_audio_stream(AVFormatCon
         fprintf(stderr, "Could not alloc stream\n");
         av_exit(1);
     }
-    avcodec_get_context_defaults2(st->codec, CODEC_TYPE_AUDIO);
+    avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_AUDIO);
 
     bitstream_filters[nb_output_files][oc->nb_streams - 1]= audio_bitstream_filters;
     audio_bitstream_filters= NULL;
@@ -3308,14 +3308,14 @@ static void new_audio_stream(AVFormatCon
     avcodec_thread_init(st->codec, thread_count);
 
     audio_enc = st->codec;
-    audio_enc->codec_type = CODEC_TYPE_AUDIO;
+    audio_enc->codec_type = AVMEDIA_TYPE_AUDIO;
 
     if(audio_codec_tag)
         audio_enc->codec_tag= audio_codec_tag;
 
     if (oc->oformat->flags & AVFMT_GLOBALHEADER) {
         audio_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
-        avcodec_opts[CODEC_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
+        avcodec_opts[AVMEDIA_TYPE_AUDIO]->flags|= CODEC_FLAG_GLOBAL_HEADER;
     }
     if (audio_stream_copy) {
         st->stream_copy = 1;
@@ -3323,14 +3323,14 @@ static void new_audio_stream(AVFormatCon
     } else {
         AVCodec *codec;
 
-        set_context_opts(audio_enc, avcodec_opts[CODEC_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
+        set_context_opts(audio_enc, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
 
         if (audio_codec_name) {
-            codec_id = find_codec_or_die(audio_codec_name, CODEC_TYPE_AUDIO, 1);
+            codec_id = find_codec_or_die(audio_codec_name, AVMEDIA_TYPE_AUDIO, 1);
             codec = avcodec_find_encoder_by_name(audio_codec_name);
             output_codecs[nb_ocodecs] = codec;
         } else {
-            codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, CODEC_TYPE_AUDIO);
+            codec_id = av_guess_codec(oc->oformat, NULL, oc->filename, NULL, AVMEDIA_TYPE_AUDIO);
             codec = avcodec_find_encoder(codec_id);
         }
         audio_enc->codec_id = codec_id;
@@ -3370,13 +3370,13 @@ static void new_subtitle_stream(AVFormat
         fprintf(stderr, "Could not alloc stream\n");
         av_exit(1);
     }
-    avcodec_get_context_defaults2(st->codec, CODEC_TYPE_SUBTITLE);
+    avcodec_get_context_defaults2(st->codec, AVMEDIA_TYPE_SUBTITLE);
 
     bitstream_filters[nb_output_files][oc->nb_streams - 1]= subtitle_bitstream_filters;
     subtitle_bitstream_filters= NULL;
 
     subtitle_enc = st->codec;
-    subtitle_enc->codec_type = CODEC_TYPE_SUBTITLE;
+    subtitle_enc->codec_type = AVMEDIA_TYPE_SUBTITLE;
 
     if(subtitle_codec_tag)
         subtitle_enc->codec_tag= subtitle_codec_tag;
@@ -3384,8 +3384,8 @@ static void new_subtitle_stream(AVFormat
     if (subtitle_stream_copy) {
         st->stream_copy = 1;
     } else {
-        set_context_opts(avcodec_opts[CODEC_TYPE_SUBTITLE], subtitle_enc, AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
-        subtitle_enc->codec_id = find_codec_or_die(subtitle_codec_name, CODEC_TYPE_SUBTITLE, 1);
+        set_context_opts(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], subtitle_enc, AV_OPT_FLAG_SUBTITLE_PARAM | AV_OPT_FLAG_ENCODING_PARAM);
+        subtitle_enc->codec_id = find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 1);
         output_codecs[nb_ocodecs] = avcodec_find_encoder_by_name(subtitle_codec_name);
     }
     nb_ocodecs++;
@@ -3739,7 +3739,7 @@ static void opt_target(const char *arg)
                 for(j = 0; j < nb_input_files; j++) {
                     for(i = 0; i < input_files[j]->nb_streams; i++) {
                         AVCodecContext *c = input_files[j]->streams[i]->codec;
-                        if(c->codec_type != CODEC_TYPE_VIDEO)
+                        if(c->codec_type != AVMEDIA_TYPE_VIDEO)
                             continue;
                         fr = c->time_base.den * 1000 / c->time_base.num;
                         if(fr == 25000) {
@@ -3965,7 +3965,7 @@ static const OptionDef options[] = {
     { "itsscale", HAS_ARG, {(void*)opt_input_ts_scale}, "set the input ts scale", "stream:scale" },
     { "timestamp", OPT_FUNC2 | HAS_ARG, {(void*)opt_rec_timestamp}, "set the timestamp ('now' to set the current time)", "time" },
     { "metadata", OPT_FUNC2 | HAS_ARG, {(void*)opt_metadata}, "add metadata", "string=string" },
-    { "dframes", OPT_INT | HAS_ARG, {(void*)&max_frames[CODEC_TYPE_DATA]}, "set the number of data frames to record", "number" },
+    { "dframes", OPT_INT | HAS_ARG, {(void*)&max_frames[AVMEDIA_TYPE_DATA]}, "set the number of data frames to record", "number" },
     { "benchmark", OPT_BOOL | OPT_EXPERT, {(void*)&do_benchmark},
       "add timings for benchmarking" },
     { "timelimit", OPT_FUNC2 | HAS_ARG, {(void*)opt_timelimit}, "set max runtime in seconds", "limit" },
@@ -3993,7 +3993,7 @@ static const OptionDef options[] = {
     /* video options */
     { "b", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" },
     { "vb", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" },
-    { "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[CODEC_TYPE_VIDEO]}, "set the number of video frames to record", "number" },
+    { "vframes", OPT_INT | HAS_ARG | OPT_VIDEO, {(void*)&max_frames[AVMEDIA_TYPE_VIDEO]}, "set the number of video frames to record", "number" },
     { "r", OPT_FUNC2 | HAS_ARG | OPT_VIDEO, {(void*)opt_frame_rate}, "set frame rate (Hz value, fraction or abbreviation)", "rate" },
     { "s", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_size}, "set frame size (WxH or abbreviation)", "size" },
     { "aspect", HAS_ARG | OPT_VIDEO, {(void*)opt_frame_aspect_ratio}, "set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)", "aspect" },
@@ -4035,7 +4035,7 @@ static const OptionDef options[] = {
 
     /* audio options */
     { "ab", OPT_FUNC2 | HAS_ARG | OPT_AUDIO, {(void*)opt_bitrate}, "set bitrate (in bits/s)", "bitrate" },
-    { "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[CODEC_TYPE_AUDIO]}, "set the number of audio frames to record", "number" },
+    { "aframes", OPT_INT | HAS_ARG | OPT_AUDIO, {(void*)&max_frames[AVMEDIA_TYPE_AUDIO]}, "set the number of audio frames to record", "number" },
     { "aq", OPT_FLOAT | HAS_ARG | OPT_AUDIO, {(void*)&audio_qscale}, "set audio quality (codec-specific)", "quality", },
     { "ar", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_rate}, "set audio sampling rate (in Hz)", "rate" },
     { "ac", HAS_ARG | OPT_FUNC2 | OPT_AUDIO, {(void*)opt_audio_channels}, "set number of audio channels", "channels" },
@@ -4090,7 +4090,7 @@ int main(int argc, char **argv)
         url_set_interrupt_cb(decode_interrupt_cb);
 #endif
 
-    for(i=0; i<CODEC_TYPE_NB; i++){
+    for(i=0; i<AVMEDIA_TYPE_NB; i++){
         avcodec_opts[i]= avcodec_alloc_context2(i);
     }
     avformat_opts = avformat_alloc_context();

Modified: trunk/ffplay.c
==============================================================================
--- trunk/ffplay.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/ffplay.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -234,10 +234,10 @@ static int frame_height = 0;
 static enum PixelFormat frame_pix_fmt = PIX_FMT_NONE;
 static int audio_disable;
 static int video_disable;
-static int wanted_stream[CODEC_TYPE_NB]={
-    [CODEC_TYPE_AUDIO]=-1,
-    [CODEC_TYPE_VIDEO]=-1,
-    [CODEC_TYPE_SUBTITLE]=-1,
+static int wanted_stream[AVMEDIA_TYPE_NB]={
+    [AVMEDIA_TYPE_AUDIO]=-1,
+    [AVMEDIA_TYPE_VIDEO]=-1,
+    [AVMEDIA_TYPE_SUBTITLE]=-1,
 };
 static int seek_by_bytes=-1;
 static int display_disable;
@@ -1643,7 +1643,7 @@ static AVFilter input_filter =
 
     .inputs    = (AVFilterPad[]) {{ .name = NULL }},
     .outputs   = (AVFilterPad[]) {{ .name = "default",
-                                    .type = CODEC_TYPE_VIDEO,
+                                    .type = AVMEDIA_TYPE_VIDEO,
                                     .request_frame = input_request_frame,
                                     .config_props  = input_config_props, },
                                   { .name = NULL }},
@@ -1689,7 +1689,7 @@ static AVFilter output_filter =
     .query_formats = output_query_formats,
 
     .inputs    = (AVFilterPad[]) {{ .name          = "default",
-                                    .type          = CODEC_TYPE_VIDEO,
+                                    .type          = AVMEDIA_TYPE_VIDEO,
                                     .end_frame     = output_end_frame,
                                     .min_perms     = AV_PERM_READ, },
                                   { .name = NULL }},
@@ -2122,7 +2122,7 @@ static int stream_component_open(VideoSt
     avctx = ic->streams[stream_index]->codec;
 
     /* prepare audio output */
-    if (avctx->codec_type == CODEC_TYPE_AUDIO) {
+    if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
         if (avctx->channels > 0) {
             avctx->request_channels = FFMIN(2, avctx->channels);
         } else {
@@ -2152,7 +2152,7 @@ static int stream_component_open(VideoSt
         return -1;
 
     /* prepare audio output */
-    if (avctx->codec_type == CODEC_TYPE_AUDIO) {
+    if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
         wanted_spec.freq = avctx->sample_rate;
         wanted_spec.format = AUDIO_S16SYS;
         wanted_spec.channels = avctx->channels;
@@ -2170,7 +2170,7 @@ static int stream_component_open(VideoSt
 
     ic->streams[stream_index]->discard = AVDISCARD_DEFAULT;
     switch(avctx->codec_type) {
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         is->audio_stream = stream_index;
         is->audio_st = ic->streams[stream_index];
         is->audio_buf_size = 0;
@@ -2187,7 +2187,7 @@ static int stream_component_open(VideoSt
         packet_queue_init(&is->audioq);
         SDL_PauseAudio(0);
         break;
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         is->video_stream = stream_index;
         is->video_st = ic->streams[stream_index];
 
@@ -2196,7 +2196,7 @@ static int stream_component_open(VideoSt
         packet_queue_init(&is->videoq);
         is->video_tid = SDL_CreateThread(video_thread, is);
         break;
-    case CODEC_TYPE_SUBTITLE:
+    case AVMEDIA_TYPE_SUBTITLE:
         is->subtitle_stream = stream_index;
         is->subtitle_st = ic->streams[stream_index];
         packet_queue_init(&is->subtitleq);
@@ -2219,7 +2219,7 @@ static void stream_component_close(Video
     avctx = ic->streams[stream_index]->codec;
 
     switch(avctx->codec_type) {
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         packet_queue_abort(&is->audioq);
 
         SDL_CloseAudio();
@@ -2229,7 +2229,7 @@ static void stream_component_close(Video
             av_audio_convert_free(is->reformat_ctx);
         is->reformat_ctx = NULL;
         break;
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         packet_queue_abort(&is->videoq);
 
         /* note: we also signal this mutex to make sure we deblock the
@@ -2242,7 +2242,7 @@ static void stream_component_close(Video
 
         packet_queue_end(&is->videoq);
         break;
-    case CODEC_TYPE_SUBTITLE:
+    case AVMEDIA_TYPE_SUBTITLE:
         packet_queue_abort(&is->subtitleq);
 
         /* note: we also signal this mutex to make sure we deblock the
@@ -2264,15 +2264,15 @@ static void stream_component_close(Video
     ic->streams[stream_index]->discard = AVDISCARD_ALL;
     avcodec_close(avctx);
     switch(avctx->codec_type) {
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         is->audio_st = NULL;
         is->audio_stream = -1;
         break;
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         is->video_st = NULL;
         is->video_stream = -1;
         break;
-    case CODEC_TYPE_SUBTITLE:
+    case AVMEDIA_TYPE_SUBTITLE:
         is->subtitle_st = NULL;
         is->subtitle_stream = -1;
         break;
@@ -2296,9 +2296,9 @@ static int decode_thread(void *arg)
     VideoState *is = arg;
     AVFormatContext *ic;
     int err, i, ret;
-    int st_index[CODEC_TYPE_NB];
-    int st_count[CODEC_TYPE_NB]={0};
-    int st_best_packet_count[CODEC_TYPE_NB];
+    int st_index[AVMEDIA_TYPE_NB];
+    int st_count[AVMEDIA_TYPE_NB]={0};
+    int st_best_packet_count[AVMEDIA_TYPE_NB];
     AVPacket pkt1, *pkt = &pkt1;
     AVFormatParameters params, *ap = ¶ms;
     int eof=0;
@@ -2366,7 +2366,7 @@ static int decode_thread(void *arg)
         AVStream *st= ic->streams[i];
         AVCodecContext *avctx = st->codec;
         ic->streams[i]->discard = AVDISCARD_ALL;
-        if(avctx->codec_type >= (unsigned)CODEC_TYPE_NB)
+        if(avctx->codec_type >= (unsigned)AVMEDIA_TYPE_NB)
             continue;
         if(st_count[avctx->codec_type]++ != wanted_stream[avctx->codec_type] && wanted_stream[avctx->codec_type] >= 0)
             continue;
@@ -2376,12 +2376,12 @@ static int decode_thread(void *arg)
         st_best_packet_count[avctx->codec_type]= st->codec_info_nb_frames;
 
         switch(avctx->codec_type) {
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             if (!audio_disable)
-                st_index[CODEC_TYPE_AUDIO] = i;
+                st_index[AVMEDIA_TYPE_AUDIO] = i;
             break;
-        case CODEC_TYPE_VIDEO:
-        case CODEC_TYPE_SUBTITLE:
+        case AVMEDIA_TYPE_VIDEO:
+        case AVMEDIA_TYPE_SUBTITLE:
             if (!video_disable)
                 st_index[avctx->codec_type] = i;
             break;
@@ -2394,13 +2394,13 @@ static int decode_thread(void *arg)
     }
 
     /* open the streams */
-    if (st_index[CODEC_TYPE_AUDIO] >= 0) {
-        stream_component_open(is, st_index[CODEC_TYPE_AUDIO]);
+    if (st_index[AVMEDIA_TYPE_AUDIO] >= 0) {
+        stream_component_open(is, st_index[AVMEDIA_TYPE_AUDIO]);
     }
 
     ret=-1;
-    if (st_index[CODEC_TYPE_VIDEO] >= 0) {
-        ret= stream_component_open(is, st_index[CODEC_TYPE_VIDEO]);
+    if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) {
+        ret= stream_component_open(is, st_index[AVMEDIA_TYPE_VIDEO]);
     }
     is->refresh_tid = SDL_CreateThread(refresh_thread, is);
     if(ret<0) {
@@ -2408,8 +2408,8 @@ static int decode_thread(void *arg)
             is->show_audio = 2;
     }
 
-    if (st_index[CODEC_TYPE_SUBTITLE] >= 0) {
-        stream_component_open(is, st_index[CODEC_TYPE_SUBTITLE]);
+    if (st_index[AVMEDIA_TYPE_SUBTITLE] >= 0) {
+        stream_component_open(is, st_index[AVMEDIA_TYPE_SUBTITLE]);
     }
 
     if (is->video_stream < 0 && is->audio_stream < 0) {
@@ -2612,19 +2612,19 @@ static void stream_cycle_channel(VideoSt
     int start_index, stream_index;
     AVStream *st;
 
-    if (codec_type == CODEC_TYPE_VIDEO)
+    if (codec_type == AVMEDIA_TYPE_VIDEO)
         start_index = is->video_stream;
-    else if (codec_type == CODEC_TYPE_AUDIO)
+    else if (codec_type == AVMEDIA_TYPE_AUDIO)
         start_index = is->audio_stream;
     else
         start_index = is->subtitle_stream;
-    if (start_index < (codec_type == CODEC_TYPE_SUBTITLE ? -1 : 0))
+    if (start_index < (codec_type == AVMEDIA_TYPE_SUBTITLE ? -1 : 0))
         return;
     stream_index = start_index;
     for(;;) {
         if (++stream_index >= is->ic->nb_streams)
         {
-            if (codec_type == CODEC_TYPE_SUBTITLE)
+            if (codec_type == AVMEDIA_TYPE_SUBTITLE)
             {
                 stream_index = -1;
                 goto the_end;
@@ -2637,13 +2637,13 @@ static void stream_cycle_channel(VideoSt
         if (st->codec->codec_type == codec_type) {
             /* check that parameters are OK */
             switch(codec_type) {
-            case CODEC_TYPE_AUDIO:
+            case AVMEDIA_TYPE_AUDIO:
                 if (st->codec->sample_rate != 0 &&
                     st->codec->channels != 0)
                     goto the_end;
                 break;
-            case CODEC_TYPE_VIDEO:
-            case CODEC_TYPE_SUBTITLE:
+            case AVMEDIA_TYPE_VIDEO:
+            case AVMEDIA_TYPE_SUBTITLE:
                 goto the_end;
             default:
                 break;
@@ -2690,7 +2690,7 @@ static void do_exit(void)
         stream_close(cur_stream);
         cur_stream = NULL;
     }
-    for (i = 0; i < CODEC_TYPE_NB; i++)
+    for (i = 0; i < AVMEDIA_TYPE_NB; i++)
         av_free(avcodec_opts[i]);
     av_free(avformat_opts);
     av_free(sws_opts);
@@ -2743,15 +2743,15 @@ static void event_loop(void)
                 break;
             case SDLK_a:
                 if (cur_stream)
-                    stream_cycle_channel(cur_stream, CODEC_TYPE_AUDIO);
+                    stream_cycle_channel(cur_stream, AVMEDIA_TYPE_AUDIO);
                 break;
             case SDLK_v:
                 if (cur_stream)
-                    stream_cycle_channel(cur_stream, CODEC_TYPE_VIDEO);
+                    stream_cycle_channel(cur_stream, AVMEDIA_TYPE_VIDEO);
                 break;
             case SDLK_t:
                 if (cur_stream)
-                    stream_cycle_channel(cur_stream, CODEC_TYPE_SUBTITLE);
+                    stream_cycle_channel(cur_stream, AVMEDIA_TYPE_SUBTITLE);
                 break;
             case SDLK_w:
                 toggle_audio_display();
@@ -2943,9 +2943,9 @@ static const OptionDef options[] = {
     { "fs", OPT_BOOL, {(void*)&is_full_screen}, "force full screen" },
     { "an", OPT_BOOL, {(void*)&audio_disable}, "disable audio" },
     { "vn", OPT_BOOL, {(void*)&video_disable}, "disable video" },
-    { "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_AUDIO]}, "select desired audio stream", "stream_number" },
-    { "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_VIDEO]}, "select desired video stream", "stream_number" },
-    { "sst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[CODEC_TYPE_SUBTITLE]}, "select desired subtitle stream", "stream_number" },
+    { "ast", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_AUDIO]}, "select desired audio stream", "stream_number" },
+    { "vst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_VIDEO]}, "select desired video stream", "stream_number" },
+    { "sst", OPT_INT | HAS_ARG | OPT_EXPERT, {(void*)&wanted_stream[AVMEDIA_TYPE_SUBTITLE]}, "select desired subtitle stream", "stream_number" },
     { "ss", HAS_ARG | OPT_FUNC2, {(void*)&opt_seek}, "seek to a given position in seconds", "pos" },
     { "bytes", OPT_INT | HAS_ARG, {(void*)&seek_by_bytes}, "seek by bytes 0=off 1=on -1=auto", "val" },
     { "nodisp", OPT_BOOL, {(void*)&display_disable}, "disable graphical display" },
@@ -3032,7 +3032,7 @@ int main(int argc, char **argv)
 #endif
     av_register_all();
 
-    for(i=0; i<CODEC_TYPE_NB; i++){
+    for(i=0; i<AVMEDIA_TYPE_NB; i++){
         avcodec_opts[i]= avcodec_alloc_context2(i);
     }
     avformat_opts = avformat_alloc_context();

Modified: trunk/ffprobe.c
==============================================================================
--- trunk/ffprobe.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/ffprobe.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -101,14 +101,14 @@ static char *time_value_string(char *buf
     return buf;
 }
 
-static const char *codec_type_string(enum CodecType codec_type)
+static const char *media_type_string(enum AVMediaType media_type)
 {
-    switch (codec_type) {
-    case CODEC_TYPE_VIDEO:        return "video";
-    case CODEC_TYPE_AUDIO:        return "audio";
-    case CODEC_TYPE_DATA:         return "data";
-    case CODEC_TYPE_SUBTITLE:     return "subtitle";
-    case CODEC_TYPE_ATTACHMENT:   return "attachment";
+    switch (media_type) {
+    case AVMEDIA_TYPE_VIDEO:      return "video";
+    case AVMEDIA_TYPE_AUDIO:      return "audio";
+    case AVMEDIA_TYPE_DATA:       return "data";
+    case AVMEDIA_TYPE_SUBTITLE:   return "subtitle";
+    case AVMEDIA_TYPE_ATTACHMENT: return "attachment";
     default:                      return "unknown";
     }
 }
@@ -134,7 +134,7 @@ static void show_stream(AVFormatContext 
             printf("codec_name=unknown\n");
         }
 
-        printf("codec_type=%s\n",         codec_type_string(dec_ctx->codec_type));
+        printf("codec_type=%s\n",         media_type_string(dec_ctx->codec_type));
         printf("codec_time_base=%d/%d\n", dec_ctx->time_base.num, dec_ctx->time_base.den);
 
         /* print AVI/FourCC tag */
@@ -150,7 +150,7 @@ static void show_stream(AVFormatContext 
         printf("\ncodec_tag=0x%04x\n", dec_ctx->codec_tag);
 
         switch (dec_ctx->codec_type) {
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             printf("width=%d\n",                   dec_ctx->width);
             printf("height=%d\n",                  dec_ctx->height);
             printf("has_b_frames=%d\n",            dec_ctx->has_b_frames);
@@ -162,7 +162,7 @@ static void show_stream(AVFormatContext 
                    av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown");
             break;
 
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             printf("sample_rate=%s\n",             value_string(val_str, sizeof(val_str),
                                                                 dec_ctx->sample_rate,
                                                                 unit_hertz_str));

Modified: trunk/ffserver.c
==============================================================================
--- trunk/ffserver.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/ffserver.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1805,7 +1805,7 @@ static void compute_status(HTTPContext *
                         AVStream *st = stream->streams[i];
                         AVCodec *codec = avcodec_find_encoder(st->codec->codec_id);
                         switch(st->codec->codec_type) {
-                        case CODEC_TYPE_AUDIO:
+                        case AVMEDIA_TYPE_AUDIO:
                             audio_bit_rate += st->codec->bit_rate;
                             if (codec) {
                                 if (*audio_codec_name)
@@ -1813,7 +1813,7 @@ static void compute_status(HTTPContext *
                                 audio_codec_name = codec->name;
                             }
                             break;
-                        case CODEC_TYPE_VIDEO:
+                        case AVMEDIA_TYPE_VIDEO:
                             video_bit_rate += st->codec->bit_rate;
                             if (codec) {
                                 if (*video_codec_name)
@@ -1821,7 +1821,7 @@ static void compute_status(HTTPContext *
                                 video_codec_name = codec->name;
                             }
                             break;
-                        case CODEC_TYPE_DATA:
+                        case AVMEDIA_TYPE_DATA:
                             video_bit_rate += st->codec->bit_rate;
                             break;
                         default:
@@ -1894,11 +1894,11 @@ static void compute_status(HTTPContext *
                 parameters[0] = 0;
 
                 switch(st->codec->codec_type) {
-                case CODEC_TYPE_AUDIO:
+                case AVMEDIA_TYPE_AUDIO:
                     type = "audio";
                     snprintf(parameters, sizeof(parameters), "%d channel(s), %d Hz", st->codec->channels, st->codec->sample_rate);
                     break;
-                case CODEC_TYPE_VIDEO:
+                case AVMEDIA_TYPE_VIDEO:
                     type = "video";
                     snprintf(parameters, sizeof(parameters), "%dx%d, q=%d-%d, fps=%d", st->codec->width, st->codec->height,
                                 st->codec->qmin, st->codec->qmax, st->codec->time_base.den / st->codec->time_base.num);
@@ -2047,7 +2047,7 @@ static int open_input_stream(HTTPContext
     c->pts_stream_index = 0;
     for(i=0;i<c->stream->nb_streams;i++) {
         if (c->pts_stream_index == 0 &&
-            c->stream->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO) {
+            c->stream->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             c->pts_stream_index = i;
         }
     }
@@ -2210,7 +2210,7 @@ static int http_prepare_data(HTTPContext
                             AVStream *st = c->fmt_in->streams[source_index];
                             pkt.stream_index = i;
                             if (pkt.flags & PKT_FLAG_KEY &&
-                                (st->codec->codec_type == CODEC_TYPE_VIDEO ||
+                                (st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||
                                  c->stream->nb_streams == 1))
                                 c->got_key_frame = 1;
                             if (!c->stream->send_on_key || c->got_key_frame)
@@ -3346,12 +3346,12 @@ static int add_av_stream(FFStream *feed,
             av1->bit_rate == av->bit_rate) {
 
             switch(av->codec_type) {
-            case CODEC_TYPE_AUDIO:
+            case AVMEDIA_TYPE_AUDIO:
                 if (av1->channels == av->channels &&
                     av1->sample_rate == av->sample_rate)
                     goto found;
                 break;
-            case CODEC_TYPE_VIDEO:
+            case AVMEDIA_TYPE_VIDEO:
                 if (av1->width == av->width &&
                     av1->height == av->height &&
                     av1->time_base.den == av->time_base.den &&
@@ -3549,7 +3549,7 @@ static void build_feed_streams(void)
                             } else if (CHECK_CODEC(bit_rate) || CHECK_CODEC(flags)) {
                                 http_log("Codec bitrates do not match for stream %d\n", i);
                                 matches = 0;
-                            } else if (ccf->codec_type == CODEC_TYPE_VIDEO) {
+                            } else if (ccf->codec_type == AVMEDIA_TYPE_VIDEO) {
                                 if (CHECK_CODEC(time_base.den) ||
                                     CHECK_CODEC(time_base.num) ||
                                     CHECK_CODEC(width) ||
@@ -3557,7 +3557,7 @@ static void build_feed_streams(void)
                                     http_log("Codec width, height and framerate do not match for stream %d\n", i);
                                     matches = 0;
                                 }
-                            } else if (ccf->codec_type == CODEC_TYPE_AUDIO) {
+                            } else if (ccf->codec_type == AVMEDIA_TYPE_AUDIO) {
                                 if (CHECK_CODEC(sample_rate) ||
                                     CHECK_CODEC(channels) ||
                                     CHECK_CODEC(frame_size)) {
@@ -3651,8 +3651,8 @@ static void compute_bandwidth(void)
         for(i=0;i<stream->nb_streams;i++) {
             AVStream *st = stream->streams[i];
             switch(st->codec->codec_type) {
-            case CODEC_TYPE_AUDIO:
-            case CODEC_TYPE_VIDEO:
+            case AVMEDIA_TYPE_AUDIO:
+            case AVMEDIA_TYPE_VIDEO:
                 bandwidth += st->codec->bit_rate;
                 break;
             default:
@@ -3670,7 +3670,7 @@ static void add_codec(FFStream *stream, 
 
     /* compute default parameters */
     switch(av->codec_type) {
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         if (av->bit_rate == 0)
             av->bit_rate = 64000;
         if (av->sample_rate == 0)
@@ -3678,7 +3678,7 @@ static void add_codec(FFStream *stream, 
         if (av->channels == 0)
             av->channels = 1;
         break;
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         if (av->bit_rate == 0)
             av->bit_rate = 64000;
         if (av->time_base.num == 0){
@@ -3742,7 +3742,7 @@ static enum CodecID opt_audio_codec(cons
 {
     AVCodec *p= avcodec_find_encoder_by_name(arg);
 
-    if (p == NULL || p->type != CODEC_TYPE_AUDIO)
+    if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)
         return CODEC_ID_NONE;
 
     return p->id;
@@ -3752,7 +3752,7 @@ static enum CodecID opt_video_codec(cons
 {
     AVCodec *p= avcodec_find_encoder_by_name(arg);
 
-    if (p == NULL || p->type != CODEC_TYPE_VIDEO)
+    if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)
         return CODEC_ID_NONE;
 
     return p->id;
@@ -4445,12 +4445,12 @@ static int parse_ffconfig(const char *fi
             } else {
                 if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) {
                     if (audio_id != CODEC_ID_NONE) {
-                        audio_enc.codec_type = CODEC_TYPE_AUDIO;
+                        audio_enc.codec_type = AVMEDIA_TYPE_AUDIO;
                         audio_enc.codec_id = audio_id;
                         add_codec(stream, &audio_enc);
                     }
                     if (video_id != CODEC_ID_NONE) {
-                        video_enc.codec_type = CODEC_TYPE_VIDEO;
+                        video_enc.codec_type = AVMEDIA_TYPE_VIDEO;
                         video_enc.codec_id = video_id;
                         add_codec(stream, &video_enc);
                     }

Modified: trunk/libavcodec/4xm.c
==============================================================================
--- trunk/libavcodec/4xm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/4xm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -842,7 +842,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec fourxm_decoder = {
     "4xm",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_4XM,
     sizeof(FourXContext),
     decode_init,

Modified: trunk/libavcodec/8bps.c
==============================================================================
--- trunk/libavcodec/8bps.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/8bps.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -221,7 +221,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec eightbps_decoder = {
         "8bps",
-        CODEC_TYPE_VIDEO,
+        AVMEDIA_TYPE_VIDEO,
         CODEC_ID_8BPS,
         sizeof(EightBpsContext),
         decode_init,

Modified: trunk/libavcodec/8svx.c
==============================================================================
--- trunk/libavcodec/8svx.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/8svx.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -94,7 +94,7 @@ static av_cold int eightsvx_decode_init(
 
 AVCodec eightsvx_fib_decoder = {
   .name           = "8svx_fib",
-  .type           = CODEC_TYPE_AUDIO,
+  .type           = AVMEDIA_TYPE_AUDIO,
   .id             = CODEC_ID_8SVX_FIB,
   .priv_data_size = sizeof (EightSvxContext),
   .init           = eightsvx_decode_init,
@@ -104,7 +104,7 @@ AVCodec eightsvx_fib_decoder = {
 
 AVCodec eightsvx_exp_decoder = {
   .name           = "8svx_exp",
-  .type           = CODEC_TYPE_AUDIO,
+  .type           = AVMEDIA_TYPE_AUDIO,
   .id             = CODEC_ID_8SVX_EXP,
   .priv_data_size = sizeof (EightSvxContext),
   .init           = eightsvx_decode_init,

Modified: trunk/libavcodec/aac.c
==============================================================================
--- trunk/libavcodec/aac.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/aac.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -2091,7 +2091,7 @@ static av_cold int aac_decode_close(AVCo
 
 AVCodec aac_decoder = {
     "aac",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_AAC,
     sizeof(AACContext),
     aac_decode_init,

Modified: trunk/libavcodec/aacenc.c
==============================================================================
--- trunk/libavcodec/aacenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/aacenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -629,7 +629,7 @@ static av_cold int aac_encode_end(AVCode
 
 AVCodec aac_encoder = {
     "aac",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_AAC,
     sizeof(AACEncContext),
     aac_encode_init,

Modified: trunk/libavcodec/aasc.c
==============================================================================
--- trunk/libavcodec/aasc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/aasc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -111,7 +111,7 @@ static av_cold int aasc_decode_end(AVCod
 
 AVCodec aasc_decoder = {
     "aasc",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_AASC,
     sizeof(AascContext),
     aasc_decode_init,

Modified: trunk/libavcodec/ac3dec.c
==============================================================================
--- trunk/libavcodec/ac3dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/ac3dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1439,7 +1439,7 @@ static av_cold int ac3_decode_end(AVCode
 
 AVCodec ac3_decoder = {
     .name = "ac3",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_AC3,
     .priv_data_size = sizeof (AC3DecodeContext),
     .init = ac3_decode_init,
@@ -1451,7 +1451,7 @@ AVCodec ac3_decoder = {
 #if CONFIG_EAC3_DECODER
 AVCodec eac3_decoder = {
     .name = "eac3",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_EAC3,
     .priv_data_size = sizeof (AC3DecodeContext),
     .init = ac3_decode_init,

Modified: trunk/libavcodec/ac3enc.c
==============================================================================
--- trunk/libavcodec/ac3enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/ac3enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1393,7 +1393,7 @@ void test_ac3(void)
 
 AVCodec ac3_encoder = {
     "ac3",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_AC3,
     sizeof(AC3EncodeContext),
     AC3_encode_init,

Modified: trunk/libavcodec/adpcm.c
==============================================================================
--- trunk/libavcodec/adpcm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/adpcm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1638,7 +1638,7 @@ static int adpcm_decode_frame(AVCodecCon
 #define ADPCM_ENCODER(id,name,long_name_)       \
 AVCodec name ## _encoder = {                    \
     #name,                                      \
-    CODEC_TYPE_AUDIO,                           \
+    AVMEDIA_TYPE_AUDIO,                         \
     id,                                         \
     sizeof(ADPCMContext),                       \
     adpcm_encode_init,                          \
@@ -1656,7 +1656,7 @@ AVCodec name ## _encoder = {            
 #define ADPCM_DECODER(id,name,long_name_)       \
 AVCodec name ## _decoder = {                    \
     #name,                                      \
-    CODEC_TYPE_AUDIO,                           \
+    AVMEDIA_TYPE_AUDIO,                         \
     id,                                         \
     sizeof(ADPCMContext),                       \
     adpcm_decode_init,                          \

Modified: trunk/libavcodec/adxdec.c
==============================================================================
--- trunk/libavcodec/adxdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/adxdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -168,7 +168,7 @@ static int adx_decode_frame(AVCodecConte
 
 AVCodec adpcm_adx_decoder = {
     "adpcm_adx",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_ADPCM_ADX,
     sizeof(ADXContext),
     adx_decode_init,

Modified: trunk/libavcodec/adxenc.c
==============================================================================
--- trunk/libavcodec/adxenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/adxenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -185,7 +185,7 @@ static int adx_encode_frame(AVCodecConte
 
 AVCodec adpcm_adx_encoder = {
     "adpcm_adx",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_ADPCM_ADX,
     sizeof(ADXContext),
     adx_encode_init,

Modified: trunk/libavcodec/alac.c
==============================================================================
--- trunk/libavcodec/alac.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/alac.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -701,7 +701,7 @@ static av_cold int alac_decode_close(AVC
 
 AVCodec alac_decoder = {
     "alac",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_ALAC,
     sizeof(ALACContext),
     alac_decode_init,

Modified: trunk/libavcodec/alacenc.c
==============================================================================
--- trunk/libavcodec/alacenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/alacenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -521,7 +521,7 @@ static av_cold int alac_encode_close(AVC
 
 AVCodec alac_encoder = {
     "alac",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_ALAC,
     sizeof(AlacEncodeContext),
     alac_encode_init,

Modified: trunk/libavcodec/alsdec.c
==============================================================================
--- trunk/libavcodec/alsdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/alsdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1622,7 +1622,7 @@ static av_cold void flush(AVCodecContext
 
 AVCodec als_decoder = {
     "als",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MP4ALS,
     sizeof(ALSDecContext),
     decode_init,

Modified: trunk/libavcodec/amrnbdec.c
==============================================================================
--- trunk/libavcodec/amrnbdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/amrnbdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1071,7 +1071,7 @@ static int amrnb_decode_frame(AVCodecCon
 
 AVCodec amrnb_decoder = {
     .name           = "amrnb",
-    .type           = CODEC_TYPE_AUDIO,
+    .type           = AVMEDIA_TYPE_AUDIO,
     .id             = CODEC_ID_AMR_NB,
     .priv_data_size = sizeof(AMRContext),
     .init           = amrnb_decode_init,

Modified: trunk/libavcodec/anm.c
==============================================================================
--- trunk/libavcodec/anm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/anm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -185,7 +185,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec anm_decoder = {
     "anm",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ANM,
     sizeof(AnmContext),
     decode_init,

Modified: trunk/libavcodec/apedec.c
==============================================================================
--- trunk/libavcodec/apedec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/apedec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -879,7 +879,7 @@ static int ape_decode_frame(AVCodecConte
 
 AVCodec ape_decoder = {
     "ape",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_APE,
     sizeof(APEContext),
     ape_decode_init,

Modified: trunk/libavcodec/asv1.c
==============================================================================
--- trunk/libavcodec/asv1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/asv1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -615,7 +615,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec asv1_decoder = {
     "asv1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ASV1,
     sizeof(ASV1Context),
     decode_init,
@@ -628,7 +628,7 @@ AVCodec asv1_decoder = {
 
 AVCodec asv2_decoder = {
     "asv2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ASV2,
     sizeof(ASV1Context),
     decode_init,
@@ -642,7 +642,7 @@ AVCodec asv2_decoder = {
 #if CONFIG_ASV1_ENCODER
 AVCodec asv1_encoder = {
     "asv1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ASV1,
     sizeof(ASV1Context),
     encode_init,
@@ -656,7 +656,7 @@ AVCodec asv1_encoder = {
 #if CONFIG_ASV2_ENCODER
 AVCodec asv2_encoder = {
     "asv2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ASV2,
     sizeof(ASV1Context),
     encode_init,

Modified: trunk/libavcodec/atrac1.c
==============================================================================
--- trunk/libavcodec/atrac1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/atrac1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -372,7 +372,7 @@ static av_cold int atrac1_decode_end(AVC
 
 AVCodec atrac1_decoder = {
     .name = "atrac1",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_ATRAC1,
     .priv_data_size = sizeof(AT1Ctx),
     .init = atrac1_decode_init,

Modified: trunk/libavcodec/atrac3.c
==============================================================================
--- trunk/libavcodec/atrac3.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/atrac3.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1016,7 +1016,7 @@ static av_cold int atrac3_decode_init(AV
 AVCodec atrac3_decoder =
 {
     .name = "atrac3",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_ATRAC3,
     .priv_data_size = sizeof(ATRAC3Context),
     .init = atrac3_decode_init,

Modified: trunk/libavcodec/aura.c
==============================================================================
--- trunk/libavcodec/aura.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/aura.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -124,7 +124,7 @@ static av_cold int aura_decode_end(AVCod
 
 AVCodec aura2_decoder = {
     "aura2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_AURA2,
     sizeof(AuraDecodeContext),
     aura_decode_init,

Modified: trunk/libavcodec/avcodec.h
==============================================================================
--- trunk/libavcodec/avcodec.h	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/avcodec.h	Wed Mar 31 01:30:55 2010	(r22735)
@@ -30,7 +30,7 @@
 #include "libavutil/avutil.h"
 
 #define LIBAVCODEC_VERSION_MAJOR 52
-#define LIBAVCODEC_VERSION_MINOR 63
+#define LIBAVCODEC_VERSION_MINOR 64
 #define LIBAVCODEC_VERSION_MICRO  0
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -355,16 +355,28 @@ enum CodecID {
                                 * stream (only used by libavformat) */
 };
 
-enum CodecType {
-    CODEC_TYPE_UNKNOWN = -1,
-    CODEC_TYPE_VIDEO,
-    CODEC_TYPE_AUDIO,
-    CODEC_TYPE_DATA,
-    CODEC_TYPE_SUBTITLE,
-    CODEC_TYPE_ATTACHMENT,
-    CODEC_TYPE_NB
+enum AVMediaType {
+    AVMEDIA_TYPE_UNKNOWN = -1,
+    AVMEDIA_TYPE_VIDEO,
+    AVMEDIA_TYPE_AUDIO,
+    AVMEDIA_TYPE_DATA,
+    AVMEDIA_TYPE_SUBTITLE,
+    AVMEDIA_TYPE_ATTACHMENT,
+    AVMEDIA_TYPE_NB
 };
 
+#if LIBAVCODEC_VERSION_MAJOR < 53
+#define CodecType AVMediaType
+
+#define CODEC_TYPE_UNKNOWN    AVMEDIA_TYPE_UNKNOWN
+#define CODEC_TYPE_VIDEO      AVMEDIA_TYPE_VIDEO
+#define CODEC_TYPE_AUDIO      AVMEDIA_TYPE_AUDIO
+#define CODEC_TYPE_DATA       AVMEDIA_TYPE_DATA
+#define CODEC_TYPE_SUBTITLE   AVMEDIA_TYPE_SUBTITLE
+#define CODEC_TYPE_ATTACHMENT AVMEDIA_TYPE_ATTACHMENT
+#define CODEC_TYPE_NB         AVMEDIA_TYPE_NB
+#endif
+
 /**
  * all in native-endian format
  */
@@ -1277,7 +1289,7 @@ typedef struct AVCodecContext {
     void *opaque;
 
     char codec_name[32];
-    enum CodecType codec_type; /* see CODEC_TYPE_xxx */
+    enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
     enum CodecID codec_id; /* see CODEC_ID_xxx */
 
     /**
@@ -2657,7 +2669,7 @@ typedef struct AVCodec {
      * This is the primary way to find a codec from the user perspective.
      */
     const char *name;
-    enum CodecType type;
+    enum AVMediaType type;
     enum CodecID id;
     int priv_data_size;
     int (*init)(AVCodecContext *);
@@ -2701,9 +2713,9 @@ typedef struct AVHWAccel {
     /**
      * Type of codec implemented by the hardware accelerator.
      *
-     * See CODEC_TYPE_xxx
+     * See AVMEDIA_TYPE_xxx
      */
-    enum CodecType type;
+    enum AVMediaType type;
 
     /**
      * Codec implemented by the hardware accelerator.
@@ -3241,7 +3253,7 @@ void avcodec_get_context_defaults(AVCode
 
 /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
  *  we WILL change its arguments and name a few times! */
-void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType);
+void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
 
 /**
  * Allocates an AVCodecContext and sets its fields to default values.  The
@@ -3254,7 +3266,7 @@ AVCodecContext *avcodec_alloc_context(vo
 
 /** THIS FUNCTION IS NOT YET PART OF THE PUBLIC API!
  *  we WILL change its arguments and name a few times! */
-AVCodecContext *avcodec_alloc_context2(enum CodecType);
+AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
 
 /**
  * Sets the fields of the given AVFrame to default values.

Modified: trunk/libavcodec/avs.c
==============================================================================
--- trunk/libavcodec/avs.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/avs.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -152,7 +152,7 @@ static av_cold int avs_decode_init(AVCod
 
 AVCodec avs_decoder = {
     "avs",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_AVS,
     sizeof(AvsContext),
     avs_decode_init,

Modified: trunk/libavcodec/bethsoftvideo.c
==============================================================================
--- trunk/libavcodec/bethsoftvideo.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/bethsoftvideo.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -132,7 +132,7 @@ static av_cold int bethsoftvid_decode_en
 
 AVCodec bethsoftvid_decoder = {
     .name = "bethsoftvid",
-    .type = CODEC_TYPE_VIDEO,
+    .type = AVMEDIA_TYPE_VIDEO,
     .id = CODEC_ID_BETHSOFTVID,
     .priv_data_size = sizeof(BethsoftvidContext),
     .init = bethsoftvid_decode_init,

Modified: trunk/libavcodec/bfi.c
==============================================================================
--- trunk/libavcodec/bfi.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/bfi.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -173,7 +173,7 @@ static av_cold int bfi_decode_close(AVCo
 
 AVCodec bfi_decoder = {
     .name = "bfi",
-    .type = CODEC_TYPE_VIDEO,
+    .type = AVMEDIA_TYPE_VIDEO,
     .id = CODEC_ID_BFI,
     .priv_data_size = sizeof(BFIContext),
     .init = bfi_decode_init,

Modified: trunk/libavcodec/bink.c
==============================================================================
--- trunk/libavcodec/bink.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/bink.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1001,7 +1001,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec bink_decoder = {
     "binkvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_BINKVIDEO,
     sizeof(BinkContext),
     decode_init,

Modified: trunk/libavcodec/binkaudio.c
==============================================================================
--- trunk/libavcodec/binkaudio.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/binkaudio.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -288,7 +288,7 @@ static int decode_frame(AVCodecContext *
 
 AVCodec binkaudio_rdft_decoder = {
     "binkaudio_rdft",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_BINKAUDIO_RDFT,
     sizeof(BinkAudioContext),
     decode_init,
@@ -300,7 +300,7 @@ AVCodec binkaudio_rdft_decoder = {
 
 AVCodec binkaudio_dct_decoder = {
     "binkaudio_dct",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_BINKAUDIO_DCT,
     sizeof(BinkAudioContext),
     decode_init,

Modified: trunk/libavcodec/bmp.c
==============================================================================
--- trunk/libavcodec/bmp.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/bmp.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -337,7 +337,7 @@ static av_cold int bmp_decode_end(AVCode
 
 AVCodec bmp_decoder = {
     "bmp",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_BMP,
     sizeof(BMPContext),
     bmp_decode_init,

Modified: trunk/libavcodec/bmpenc.c
==============================================================================
--- trunk/libavcodec/bmpenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/bmpenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -133,7 +133,7 @@ static int bmp_encode_frame(AVCodecConte
 
 AVCodec bmp_encoder = {
     "bmp",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_BMP,
     sizeof(BMPContext),
     bmp_encode_init,

Modified: trunk/libavcodec/c93.c
==============================================================================
--- trunk/libavcodec/c93.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/c93.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -244,7 +244,7 @@ static int decode_frame(AVCodecContext *
 
 AVCodec c93_decoder = {
     "c93",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_C93,
     sizeof(C93DecoderContext),
     decode_init,

Modified: trunk/libavcodec/cavsdec.c
==============================================================================
--- trunk/libavcodec/cavsdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/cavsdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -711,7 +711,7 @@ static int cavs_decode_frame(AVCodecCont
 
 AVCodec cavs_decoder = {
     "cavs",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_CAVS,
     sizeof(AVSContext),
     ff_cavs_init,

Modified: trunk/libavcodec/cdgraphics.c
==============================================================================
--- trunk/libavcodec/cdgraphics.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/cdgraphics.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -369,7 +369,7 @@ static av_cold int cdg_decode_end(AVCode
 
 AVCodec cdgraphics_decoder = {
     "cdgraphics",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_CDGRAPHICS,
     sizeof(CDGraphicsContext),
     cdg_decode_init,

Modified: trunk/libavcodec/cinepak.c
==============================================================================
--- trunk/libavcodec/cinepak.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/cinepak.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -457,7 +457,7 @@ static av_cold int cinepak_decode_end(AV
 
 AVCodec cinepak_decoder = {
     "cinepak",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_CINEPAK,
     sizeof(CinepakContext),
     cinepak_decode_init,

Modified: trunk/libavcodec/cljr.c
==============================================================================
--- trunk/libavcodec/cljr.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/cljr.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -137,7 +137,7 @@ static av_cold int encode_init(AVCodecCo
 
 AVCodec cljr_decoder = {
     "cljr",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_CLJR,
     sizeof(CLJRContext),
     decode_init,
@@ -151,7 +151,7 @@ AVCodec cljr_decoder = {
 #if CONFIG_CLJR_ENCODER
 AVCodec cljr_encoder = {
     "cljr",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_CLJR,
     sizeof(CLJRContext),
     encode_init,

Modified: trunk/libavcodec/cook.c
==============================================================================
--- trunk/libavcodec/cook.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/cook.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1288,7 +1288,7 @@ static av_cold int cook_decode_init(AVCo
 AVCodec cook_decoder =
 {
     .name = "cook",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_COOK,
     .priv_data_size = sizeof(COOKContext),
     .init = cook_decode_init,

Modified: trunk/libavcodec/cscd.c
==============================================================================
--- trunk/libavcodec/cscd.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/cscd.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -249,7 +249,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec cscd_decoder = {
     "camstudio",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_CSCD,
     sizeof(CamStudioContext),
     decode_init,

Modified: trunk/libavcodec/cyuv.c
==============================================================================
--- trunk/libavcodec/cyuv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/cyuv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -180,7 +180,7 @@ static av_cold int cyuv_decode_end(AVCod
 #if CONFIG_AURA_DECODER
 AVCodec aura_decoder = {
     "aura",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_AURA,
     sizeof(CyuvDecodeContext),
     cyuv_decode_init,
@@ -196,7 +196,7 @@ AVCodec aura_decoder = {
 #if CONFIG_CYUV_DECODER
 AVCodec cyuv_decoder = {
     "cyuv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_CYUV,
     sizeof(CyuvDecodeContext),
     cyuv_decode_init,

Modified: trunk/libavcodec/dca.c
==============================================================================
--- trunk/libavcodec/dca.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dca.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1330,7 +1330,7 @@ static av_cold int dca_decode_end(AVCode
 
 AVCodec dca_decoder = {
     .name = "dca",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_DTS,
     .priv_data_size = sizeof(DCAContext),
     .init = dca_decode_init,

Modified: trunk/libavcodec/dnxhddec.c
==============================================================================
--- trunk/libavcodec/dnxhddec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dnxhddec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -346,7 +346,7 @@ static av_cold int dnxhd_decode_close(AV
 
 AVCodec dnxhd_decoder = {
     "dnxhd",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DNXHD,
     sizeof(DNXHDContext),
     dnxhd_decode_init,

Modified: trunk/libavcodec/dnxhdenc.c
==============================================================================
--- trunk/libavcodec/dnxhdenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dnxhdenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -850,7 +850,7 @@ static int dnxhd_encode_end(AVCodecConte
 
 AVCodec dnxhd_encoder = {
     "dnxhd",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DNXHD,
     sizeof(DNXHDEncContext),
     dnxhd_encode_init,

Modified: trunk/libavcodec/dpcm.c
==============================================================================
--- trunk/libavcodec/dpcm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dpcm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -301,7 +301,7 @@ static int dpcm_decode_frame(AVCodecCont
 #define DPCM_DECODER(id, name, long_name_)      \
 AVCodec name ## _decoder = {                    \
     #name,                                      \
-    CODEC_TYPE_AUDIO,                           \
+    AVMEDIA_TYPE_AUDIO,                         \
     id,                                         \
     sizeof(DPCMContext),                        \
     dpcm_decode_init,                           \

Modified: trunk/libavcodec/dpx.c
==============================================================================
--- trunk/libavcodec/dpx.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dpx.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -216,7 +216,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec dpx_decoder = {
     "dpx",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DPX,
     sizeof(DPXContext),
     decode_init,

Modified: trunk/libavcodec/dsicinav.c
==============================================================================
--- trunk/libavcodec/dsicinav.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dsicinav.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -345,7 +345,7 @@ static int cinaudio_decode_frame(AVCodec
 
 AVCodec dsicinvideo_decoder = {
     "dsicinvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DSICINVIDEO,
     sizeof(CinVideoContext),
     cinvideo_decode_init,
@@ -358,7 +358,7 @@ AVCodec dsicinvideo_decoder = {
 
 AVCodec dsicinaudio_decoder = {
     "dsicinaudio",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_DSICINAUDIO,
     sizeof(CinAudioContext),
     cinaudio_decode_init,

Modified: trunk/libavcodec/dv.c
==============================================================================
--- trunk/libavcodec/dv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1282,7 +1282,7 @@ static int dvvideo_close(AVCodecContext 
 #if CONFIG_DVVIDEO_ENCODER
 AVCodec dvvideo_encoder = {
     "dvvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DVVIDEO,
     sizeof(DVVideoContext),
     dvvideo_init_encoder,
@@ -1295,7 +1295,7 @@ AVCodec dvvideo_encoder = {
 #if CONFIG_DVVIDEO_DECODER
 AVCodec dvvideo_decoder = {
     "dvvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DVVIDEO,
     sizeof(DVVideoContext),
     dvvideo_init,

Modified: trunk/libavcodec/dvbsub.c
==============================================================================
--- trunk/libavcodec/dvbsub.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dvbsub.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -404,7 +404,7 @@ static int dvbsub_encode(AVCodecContext 
 
 AVCodec dvbsub_encoder = {
     "dvbsub",
-    CODEC_TYPE_SUBTITLE,
+    AVMEDIA_TYPE_SUBTITLE,
     CODEC_ID_DVB_SUBTITLE,
     sizeof(DVBSubtitleContext),
     NULL,

Modified: trunk/libavcodec/dvbsubdec.c
==============================================================================
--- trunk/libavcodec/dvbsubdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dvbsubdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1413,7 +1413,7 @@ static int dvbsub_decode(AVCodecContext 
 
 AVCodec dvbsub_decoder = {
     "dvbsub",
-    CODEC_TYPE_SUBTITLE,
+    AVMEDIA_TYPE_SUBTITLE,
     CODEC_ID_DVB_SUBTITLE,
     sizeof(DVBSubContext),
     dvbsub_init_decoder,

Modified: trunk/libavcodec/dvdsubdec.c
==============================================================================
--- trunk/libavcodec/dvdsubdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dvdsubdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -488,7 +488,7 @@ static int dvdsub_decode(AVCodecContext 
 
 AVCodec dvdsub_decoder = {
     "dvdsub",
-    CODEC_TYPE_SUBTITLE,
+    AVMEDIA_TYPE_SUBTITLE,
     CODEC_ID_DVD_SUBTITLE,
     0,
     NULL,

Modified: trunk/libavcodec/dvdsubenc.c
==============================================================================
--- trunk/libavcodec/dvdsubenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dvdsubenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -217,7 +217,7 @@ static int dvdsub_encode(AVCodecContext 
 
 AVCodec dvdsub_encoder = {
     "dvdsub",
-    CODEC_TYPE_SUBTITLE,
+    AVMEDIA_TYPE_SUBTITLE,
     CODEC_ID_DVD_SUBTITLE,
     0,
     NULL,

Modified: trunk/libavcodec/dxa.c
==============================================================================
--- trunk/libavcodec/dxa.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dxa.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -319,7 +319,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec dxa_decoder = {
     "dxa",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DXA,
     sizeof(DxaDecContext),
     decode_init,

Modified: trunk/libavcodec/dxva2_h264.c
==============================================================================
--- trunk/libavcodec/dxva2_h264.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dxva2_h264.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -425,7 +425,7 @@ static int end_frame(AVCodecContext *avc
 
 AVHWAccel h264_dxva2_hwaccel = {
     .name           = "h264_dxva2",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_H264,
     .pix_fmt        = PIX_FMT_DXVA2_VLD,
     .capabilities   = 0,

Modified: trunk/libavcodec/dxva2_vc1.c
==============================================================================
--- trunk/libavcodec/dxva2_vc1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/dxva2_vc1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -266,7 +266,7 @@ static int end_frame(AVCodecContext *avc
 #if CONFIG_WMV3_DXVA2_HWACCEL
 AVHWAccel wmv3_dxva2_hwaccel = {
     .name           = "wmv3_dxva2",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_WMV3,
     .pix_fmt        = PIX_FMT_DXVA2_VLD,
     .capabilities   = 0,
@@ -279,7 +279,7 @@ AVHWAccel wmv3_dxva2_hwaccel = {
 
 AVHWAccel vc1_dxva2_hwaccel = {
     .name           = "vc1_dxva2",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_VC1,
     .pix_fmt        = PIX_FMT_DXVA2_VLD,
     .capabilities   = 0,

Modified: trunk/libavcodec/eacmv.c
==============================================================================
--- trunk/libavcodec/eacmv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/eacmv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -205,7 +205,7 @@ static av_cold int cmv_decode_end(AVCode
 
 AVCodec eacmv_decoder = {
     "eacmv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_CMV,
     sizeof(CmvContext),
     cmv_decode_init,

Modified: trunk/libavcodec/eamad.c
==============================================================================
--- trunk/libavcodec/eamad.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/eamad.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -307,7 +307,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec eamad_decoder = {
     "eamad",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MAD,
     sizeof(MadContext),
     decode_init,

Modified: trunk/libavcodec/eatgq.c
==============================================================================
--- trunk/libavcodec/eatgq.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/eatgq.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -245,7 +245,7 @@ static av_cold int tgq_decode_end(AVCode
 
 AVCodec eatgq_decoder = {
     "eatgq",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TGQ,
     sizeof(TgqContext),
     tgq_decode_init,

Modified: trunk/libavcodec/eatgv.c
==============================================================================
--- trunk/libavcodec/eatgv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/eatgv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -335,7 +335,7 @@ static av_cold int tgv_decode_end(AVCode
 
 AVCodec eatgv_decoder = {
     "eatgv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TGV,
     sizeof(TgvContext),
     tgv_decode_init,

Modified: trunk/libavcodec/eatqi.c
==============================================================================
--- trunk/libavcodec/eatqi.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/eatqi.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -156,7 +156,7 @@ static av_cold int tqi_decode_end(AVCode
 
 AVCodec eatqi_decoder = {
     "eatqi",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TQI,
     sizeof(TqiContext),
     tqi_decode_init,

Modified: trunk/libavcodec/escape124.c
==============================================================================
--- trunk/libavcodec/escape124.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/escape124.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -374,7 +374,7 @@ static int escape124_decode_frame(AVCode
 
 AVCodec escape124_decoder = {
     "escape124",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ESCAPE124,
     sizeof(Escape124Context),
     escape124_decode_init,

Modified: trunk/libavcodec/ffv1.c
==============================================================================
--- trunk/libavcodec/ffv1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/ffv1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1125,7 +1125,7 @@ static int decode_frame(AVCodecContext *
 
 AVCodec ffv1_decoder = {
     "ffv1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FFV1,
     sizeof(FFV1Context),
     decode_init,
@@ -1140,7 +1140,7 @@ AVCodec ffv1_decoder = {
 #if CONFIG_FFV1_ENCODER
 AVCodec ffv1_encoder = {
     "ffv1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FFV1,
     sizeof(FFV1Context),
     encode_init,

Modified: trunk/libavcodec/flacdec.c
==============================================================================
--- trunk/libavcodec/flacdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/flacdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -799,7 +799,7 @@ static void flac_flush(AVCodecContext *a
 
 AVCodec flac_decoder = {
     "flac",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_FLAC,
     sizeof(FLACContext),
     flac_decode_init,

Modified: trunk/libavcodec/flacenc.c
==============================================================================
--- trunk/libavcodec/flacenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/flacenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1253,7 +1253,7 @@ static av_cold int flac_encode_close(AVC
 
 AVCodec flac_encoder = {
     "flac",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_FLAC,
     sizeof(FlacEncodeContext),
     flac_encode_init,

Modified: trunk/libavcodec/flashsv.c
==============================================================================
--- trunk/libavcodec/flashsv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/flashsv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -252,7 +252,7 @@ static av_cold int flashsv_decode_end(AV
 
 AVCodec flashsv_decoder = {
     "flashsv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FLASHSV,
     sizeof(FlashSVContext),
     flashsv_decode_init,

Modified: trunk/libavcodec/flashsvenc.c
==============================================================================
--- trunk/libavcodec/flashsvenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/flashsvenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -282,7 +282,7 @@ static av_cold int flashsv_encode_end(AV
 
 AVCodec flashsv_encoder = {
     "flashsv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FLASHSV,
     sizeof(FlashSVContext),
     flashsv_encode_init,

Modified: trunk/libavcodec/flicvideo.c
==============================================================================
--- trunk/libavcodec/flicvideo.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/flicvideo.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -739,7 +739,7 @@ static av_cold int flic_decode_end(AVCod
 
 AVCodec flic_decoder = {
     "flic",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FLIC,
     sizeof(FlicDecodeContext),
     flic_decode_init,

Modified: trunk/libavcodec/flvdec.c
==============================================================================
--- trunk/libavcodec/flvdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/flvdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -119,7 +119,7 @@ int ff_flv_decode_picture_header(MpegEnc
 
 AVCodec flv_decoder = {
     "flv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FLV1,
     sizeof(MpegEncContext),
     ff_h263_decode_init,

Modified: trunk/libavcodec/flvenc.c
==============================================================================
--- trunk/libavcodec/flvenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/flvenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -86,7 +86,7 @@ void ff_flv2_encode_ac_esc(PutBitContext
 
 AVCodec flv_encoder = {
     "flv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FLV1,
     sizeof(MpegEncContext),
     MPV_encode_init,

Modified: trunk/libavcodec/fraps.c
==============================================================================
--- trunk/libavcodec/fraps.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/fraps.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -366,7 +366,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec fraps_decoder = {
     "fraps",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FRAPS,
     sizeof(FrapsContext),
     decode_init,

Modified: trunk/libavcodec/frwu.c
==============================================================================
--- trunk/libavcodec/frwu.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/frwu.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -111,7 +111,7 @@ static av_cold int decode_close(AVCodecC
 
 AVCodec frwu_decoder = {
     "FRWU",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FRWU,
     0,
     decode_init,

Modified: trunk/libavcodec/g726.c
==============================================================================
--- trunk/libavcodec/g726.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/g726.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -387,7 +387,7 @@ static int g726_decode_frame(AVCodecCont
 #if CONFIG_ADPCM_G726_ENCODER
 AVCodec adpcm_g726_encoder = {
     "g726",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_ADPCM_G726,
     sizeof(G726Context),
     g726_init,
@@ -401,7 +401,7 @@ AVCodec adpcm_g726_encoder = {
 
 AVCodec adpcm_g726_decoder = {
     "g726",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_ADPCM_G726,
     sizeof(G726Context),
     g726_init,

Modified: trunk/libavcodec/g729dec.c
==============================================================================
--- trunk/libavcodec/g729dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/g729dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -315,7 +315,7 @@ static int decode_frame(AVCodecContext *
 AVCodec g729_decoder =
 {
     "g729",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_G729,
     sizeof(G729Context),
     decoder_init,

Modified: trunk/libavcodec/gif.c
==============================================================================
--- trunk/libavcodec/gif.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/gif.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -168,7 +168,7 @@ static int gif_encode_close(AVCodecConte
 
 AVCodec gif_encoder = {
     "gif",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_GIF,
     sizeof(GIFContext),
     gif_encode_init,

Modified: trunk/libavcodec/gifdec.c
==============================================================================
--- trunk/libavcodec/gifdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/gifdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -328,7 +328,7 @@ static av_cold int gif_decode_close(AVCo
 
 AVCodec gif_decoder = {
     "gif",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_GIF,
     sizeof(GifState),
     gif_decode_init,

Modified: trunk/libavcodec/h261dec.c
==============================================================================
--- trunk/libavcodec/h261dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/h261dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -643,7 +643,7 @@ static av_cold int h261_decode_end(AVCod
 
 AVCodec h261_decoder = {
     "h261",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_H261,
     sizeof(H261Context),
     h261_decode_init,

Modified: trunk/libavcodec/h261enc.c
==============================================================================
--- trunk/libavcodec/h261enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/h261enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -323,7 +323,7 @@ static void h261_encode_block(H261Contex
 
 AVCodec h261_encoder = {
     "h261",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_H261,
     sizeof(H261Context),
     MPV_encode_init,

Modified: trunk/libavcodec/h263dec.c
==============================================================================
--- trunk/libavcodec/h263dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/h263dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -727,7 +727,7 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n
 
 AVCodec h263_decoder = {
     "h263",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_H263,
     sizeof(MpegEncContext),
     ff_h263_decode_init,

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/h264.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -3148,7 +3148,7 @@ av_cold int ff_h264_decode_end(AVCodecCo
 
 AVCodec h264_decoder = {
     "h264",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_H264,
     sizeof(H264Context),
     ff_h264_decode_init,
@@ -3164,7 +3164,7 @@ AVCodec h264_decoder = {
 #if CONFIG_H264_VDPAU_DECODER
 AVCodec h264_vdpau_decoder = {
     "h264_vdpau",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_H264,
     sizeof(H264Context),
     ff_h264_decode_init,

Modified: trunk/libavcodec/huffyuv.c
==============================================================================
--- trunk/libavcodec/huffyuv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/huffyuv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1414,7 +1414,7 @@ static av_cold int encode_end(AVCodecCon
 #if CONFIG_HUFFYUV_DECODER
 AVCodec huffyuv_decoder = {
     "huffyuv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_HUFFYUV,
     sizeof(HYuvContext),
     decode_init,
@@ -1430,7 +1430,7 @@ AVCodec huffyuv_decoder = {
 #if CONFIG_FFVHUFF_DECODER
 AVCodec ffvhuff_decoder = {
     "ffvhuff",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FFVHUFF,
     sizeof(HYuvContext),
     decode_init,
@@ -1446,7 +1446,7 @@ AVCodec ffvhuff_decoder = {
 #if CONFIG_HUFFYUV_ENCODER
 AVCodec huffyuv_encoder = {
     "huffyuv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_HUFFYUV,
     sizeof(HYuvContext),
     encode_init,
@@ -1460,7 +1460,7 @@ AVCodec huffyuv_encoder = {
 #if CONFIG_FFVHUFF_ENCODER
 AVCodec ffvhuff_encoder = {
     "ffvhuff",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_FFVHUFF,
     sizeof(HYuvContext),
     encode_init,

Modified: trunk/libavcodec/idcinvideo.c
==============================================================================
--- trunk/libavcodec/idcinvideo.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/idcinvideo.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -255,7 +255,7 @@ static av_cold int idcin_decode_end(AVCo
 
 AVCodec idcin_decoder = {
     "idcinvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_IDCIN,
     sizeof(IdcinContext),
     idcin_decode_init,

Modified: trunk/libavcodec/iff.c
==============================================================================
--- trunk/libavcodec/iff.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/iff.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -218,7 +218,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec iff_ilbm_decoder = {
     "iff_ilbm",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_IFF_ILBM,
     sizeof(IffContext),
     decode_init,
@@ -231,7 +231,7 @@ AVCodec iff_ilbm_decoder = {
 
 AVCodec iff_byterun1_decoder = {
     "iff_byterun1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_IFF_BYTERUN1,
     sizeof(IffContext),
     decode_init,

Modified: trunk/libavcodec/imc.c
==============================================================================
--- trunk/libavcodec/imc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/imc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -823,7 +823,7 @@ static av_cold int imc_decode_close(AVCo
 
 AVCodec imc_decoder = {
     .name = "imc",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_IMC,
     .priv_data_size = sizeof(IMCContext),
     .init = imc_decode_init,

Modified: trunk/libavcodec/indeo2.c
==============================================================================
--- trunk/libavcodec/indeo2.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/indeo2.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -226,7 +226,7 @@ static av_cold int ir2_decode_end(AVCode
 
 AVCodec indeo2_decoder = {
     "indeo2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_INDEO2,
     sizeof(Ir2Context),
     ir2_decode_init,

Modified: trunk/libavcodec/indeo3.c
==============================================================================
--- trunk/libavcodec/indeo3.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/indeo3.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1138,7 +1138,7 @@ static av_cold int indeo3_decode_end(AVC
 
 AVCodec indeo3_decoder = {
     "indeo3",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_INDEO3,
     sizeof(Indeo3DecodeContext),
     indeo3_decode_init,

Modified: trunk/libavcodec/indeo5.c
==============================================================================
--- trunk/libavcodec/indeo5.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/indeo5.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -817,7 +817,7 @@ static av_cold int decode_close(AVCodecC
 
 AVCodec indeo5_decoder = {
     .name           = "indeo5",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_INDEO5,
     .priv_data_size = sizeof(IVI5DecContext),
     .init           = decode_init,

Modified: trunk/libavcodec/intelh263dec.c
==============================================================================
--- trunk/libavcodec/intelh263dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/intelh263dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -117,7 +117,7 @@ int ff_intel_h263_decode_picture_header(
 
 AVCodec h263i_decoder = {
     "h263i",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_H263I,
     sizeof(MpegEncContext),
     ff_h263_decode_init,

Modified: trunk/libavcodec/interplayvideo.c
==============================================================================
--- trunk/libavcodec/interplayvideo.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/interplayvideo.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1095,7 +1095,7 @@ static av_cold int ipvideo_decode_end(AV
 
 AVCodec interplay_video_decoder = {
     "interplayvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_INTERPLAY_VIDEO,
     sizeof(IpvideoContext),
     ipvideo_decode_init,

Modified: trunk/libavcodec/jpeglsdec.c
==============================================================================
--- trunk/libavcodec/jpeglsdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/jpeglsdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -365,7 +365,7 @@ int ff_jpegls_decode_picture(MJpegDecode
 
 AVCodec jpegls_decoder = {
     "jpegls",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_JPEGLS,
     sizeof(MJpegDecodeContext),
     ff_mjpeg_decode_init,

Modified: trunk/libavcodec/jpeglsenc.c
==============================================================================
--- trunk/libavcodec/jpeglsenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/jpeglsenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -384,7 +384,7 @@ static av_cold int encode_init_ls(AVCode
 
 AVCodec jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
     "jpegls",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_JPEGLS,
     sizeof(JpeglsContext),
     encode_init_ls,

Modified: trunk/libavcodec/kgv1dec.c
==============================================================================
--- trunk/libavcodec/kgv1dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/kgv1dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -165,7 +165,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec kgv1_decoder = {
     "kgv1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_KGV1,
     sizeof(KgvContext),
     decode_init,

Modified: trunk/libavcodec/kmvc.c
==============================================================================
--- trunk/libavcodec/kmvc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/kmvc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -403,7 +403,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec kmvc_decoder = {
     "kmvc",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_KMVC,
     sizeof(KmvcContext),
     decode_init,

Modified: trunk/libavcodec/lcldec.c
==============================================================================
--- trunk/libavcodec/lcldec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/lcldec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -611,7 +611,7 @@ static av_cold int decode_end(AVCodecCon
 #if CONFIG_MSZH_DECODER
 AVCodec mszh_decoder = {
     "mszh",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MSZH,
     sizeof(LclDecContext),
     decode_init,
@@ -626,7 +626,7 @@ AVCodec mszh_decoder = {
 #if CONFIG_ZLIB_DECODER
 AVCodec zlib_decoder = {
     "zlib",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ZLIB,
     sizeof(LclDecContext),
     decode_init,

Modified: trunk/libavcodec/lclenc.c
==============================================================================
--- trunk/libavcodec/lclenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/lclenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -180,7 +180,7 @@ static av_cold int encode_end(AVCodecCon
 
 AVCodec zlib_encoder = {
     "zlib",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ZLIB,
     sizeof(LclEncContext),
     encode_init,

Modified: trunk/libavcodec/libdiracdec.c
==============================================================================
--- trunk/libavcodec/libdiracdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libdiracdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -195,7 +195,7 @@ static void libdirac_flush(AVCodecContex
 
 AVCodec libdirac_decoder = {
     "libdirac",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DIRAC,
     sizeof(FfmpegDiracDecoderParams),
     libdirac_decode_init,

Modified: trunk/libavcodec/libdiracenc.c
==============================================================================
--- trunk/libavcodec/libdiracenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libdiracenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -393,7 +393,7 @@ static av_cold int libdirac_encode_close
 
 AVCodec libdirac_encoder = {
     "libdirac",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DIRAC,
     sizeof(FfmpegDiracEncoderParams),
     libdirac_encode_init,

Modified: trunk/libavcodec/libfaac.c
==============================================================================
--- trunk/libavcodec/libfaac.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libfaac.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -147,7 +147,7 @@ static av_cold int Faac_encode_close(AVC
 
 AVCodec libfaac_encoder = {
     "libfaac",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_AAC,
     sizeof(FaacAudioContext),
     Faac_encode_init,

Modified: trunk/libavcodec/libfaad.c
==============================================================================
--- trunk/libavcodec/libfaad.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libfaad.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -322,7 +322,7 @@ static av_cold int faac_decode_init(AVCo
 
 AVCodec libfaad_decoder = {
     "libfaad",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_AAC,
     sizeof(FAACContext),
     faac_decode_init,

Modified: trunk/libavcodec/libgsm.c
==============================================================================
--- trunk/libavcodec/libgsm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libgsm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -114,7 +114,7 @@ static int libgsm_encode_frame(AVCodecCo
 
 AVCodec libgsm_encoder = {
     "libgsm",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_GSM,
     0,
     libgsm_init,
@@ -126,7 +126,7 @@ AVCodec libgsm_encoder = {
 
 AVCodec libgsm_ms_encoder = {
     "libgsm_ms",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_GSM_MS,
     0,
     libgsm_init,
@@ -158,7 +158,7 @@ static int libgsm_decode_frame(AVCodecCo
 
 AVCodec libgsm_decoder = {
     "libgsm",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_GSM,
     0,
     libgsm_init,
@@ -170,7 +170,7 @@ AVCodec libgsm_decoder = {
 
 AVCodec libgsm_ms_decoder = {
     "libgsm_ms",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_GSM_MS,
     0,
     libgsm_init,

Modified: trunk/libavcodec/libmp3lame.c
==============================================================================
--- trunk/libavcodec/libmp3lame.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libmp3lame.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -216,7 +216,7 @@ static av_cold int MP3lame_encode_close(
 
 AVCodec libmp3lame_encoder = {
     "libmp3lame",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MP3,
     sizeof(Mp3AudioContext),
     MP3lame_encode_init,

Modified: trunk/libavcodec/libopencore-amr.c
==============================================================================
--- trunk/libavcodec/libopencore-amr.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libopencore-amr.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -141,7 +141,7 @@ static int amr_nb_decode_frame(AVCodecCo
 
 AVCodec libopencore_amrnb_decoder = {
     "libopencore_amrnb",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_AMR_NB,
     sizeof(AMRContext),
     amr_nb_decode_init,
@@ -215,7 +215,7 @@ static int amr_nb_encode_frame(AVCodecCo
 
 AVCodec libopencore_amrnb_encoder = {
     "libopencore_amrnb",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_AMR_NB,
     sizeof(AMRContext),
     amr_nb_encode_init,
@@ -312,7 +312,7 @@ static int amr_wb_decode_close(AVCodecCo
 
 AVCodec libopencore_amrwb_decoder = {
     "libopencore_amrwb",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_AMR_WB,
     sizeof(AMRWBContext),
     amr_wb_decode_init,

Modified: trunk/libavcodec/libopenjpeg.c
==============================================================================
--- trunk/libavcodec/libopenjpeg.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libopenjpeg.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -185,7 +185,7 @@ static av_cold int libopenjpeg_decode_cl
 
 AVCodec libopenjpeg_decoder = {
     "libopenjpeg",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_JPEG2000,
     sizeof(LibOpenJPEGContext),
     libopenjpeg_decode_init,

Modified: trunk/libavcodec/libschroedingerdec.c
==============================================================================
--- trunk/libavcodec/libschroedingerdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libschroedingerdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -347,7 +347,7 @@ static void libschroedinger_flush(AVCode
 
 AVCodec libschroedinger_decoder = {
     "libschroedinger",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DIRAC,
     sizeof(FfmpegSchroDecoderParams),
     libschroedinger_decode_init,

Modified: trunk/libavcodec/libschroedingerenc.c
==============================================================================
--- trunk/libavcodec/libschroedingerenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libschroedingerenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -407,7 +407,7 @@ static int libschroedinger_encode_close(
 
 AVCodec libschroedinger_encoder = {
     "libschroedinger",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_DIRAC,
     sizeof(FfmpegSchroEncoderParams),
     libschroedinger_encode_init,

Modified: trunk/libavcodec/libspeexdec.c
==============================================================================
--- trunk/libavcodec/libspeexdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libspeexdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -140,7 +140,7 @@ static av_cold int libspeex_decode_close
 
 AVCodec libspeex_decoder = {
     "libspeex",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_SPEEX,
     sizeof(LibSpeexContext),
     libspeex_decode_init,

Modified: trunk/libavcodec/libtheoraenc.c
==============================================================================
--- trunk/libavcodec/libtheoraenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libtheoraenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -361,7 +361,7 @@ static av_cold int encode_close(AVCodecC
 /*! AVCodec struct exposed to libavcodec */
 AVCodec libtheora_encoder = {
     .name = "libtheora",
-    .type = CODEC_TYPE_VIDEO,
+    .type = AVMEDIA_TYPE_VIDEO,
     .id = CODEC_ID_THEORA,
     .priv_data_size = sizeof(TheoraContext),
     .init = encode_init,

Modified: trunk/libavcodec/libvorbis.c
==============================================================================
--- trunk/libavcodec/libvorbis.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libvorbis.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -217,7 +217,7 @@ static av_cold int oggvorbis_encode_clos
 
 AVCodec libvorbis_encoder = {
     "libvorbis",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_VORBIS,
     sizeof(OggVorbisContext),
     oggvorbis_encode_init,

Modified: trunk/libavcodec/libx264.c
==============================================================================
--- trunk/libavcodec/libx264.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libx264.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -317,7 +317,7 @@ static av_cold int X264_init(AVCodecCont
 
 AVCodec libx264_encoder = {
     .name           = "libx264",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_H264,
     .priv_data_size = sizeof(X264Context),
     .init           = X264_init,

Modified: trunk/libavcodec/libxvidff.c
==============================================================================
--- trunk/libavcodec/libxvidff.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/libxvidff.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -769,7 +769,7 @@ int xvid_ff_2pass(void *ref, int cmd, vo
  */
 AVCodec libxvid_encoder = {
     "libxvid",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG4,
     sizeof(struct xvid_context),
     xvid_encode_init,

Modified: trunk/libavcodec/ljpegenc.c
==============================================================================
--- trunk/libavcodec/ljpegenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/ljpegenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -188,7 +188,7 @@ static int encode_picture_lossless(AVCod
 
 AVCodec ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
     "ljpeg",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_LJPEG,
     sizeof(MpegEncContext),
     MPV_encode_init,

Modified: trunk/libavcodec/loco.c
==============================================================================
--- trunk/libavcodec/loco.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/loco.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -287,7 +287,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec loco_decoder = {
     "loco",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_LOCO,
     sizeof(LOCOContext),
     decode_init,

Modified: trunk/libavcodec/mace.c
==============================================================================
--- trunk/libavcodec/mace.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mace.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -281,7 +281,7 @@ static int mace_decode_frame(AVCodecCont
 
 AVCodec mace3_decoder = {
     "mace3",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MACE3,
     sizeof(MACEContext),
     mace_decode_init,
@@ -293,7 +293,7 @@ AVCodec mace3_decoder = {
 
 AVCodec mace6_decoder = {
     "mace6",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MACE6,
     sizeof(MACEContext),
     mace_decode_init,

Modified: trunk/libavcodec/mdec.c
==============================================================================
--- trunk/libavcodec/mdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -250,7 +250,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec mdec_decoder = {
     "mdec",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MDEC,
     sizeof(MDECContext),
     decode_init,

Modified: trunk/libavcodec/mimic.c
==============================================================================
--- trunk/libavcodec/mimic.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mimic.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -380,7 +380,7 @@ static av_cold int mimic_decode_end(AVCo
 
 AVCodec mimic_decoder = {
     "mimic",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MIMIC,
     sizeof(MimicContext),
     mimic_decode_init,

Modified: trunk/libavcodec/mjpegbdec.c
==============================================================================
--- trunk/libavcodec/mjpegbdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mjpegbdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -147,7 +147,7 @@ read_header:
 
 AVCodec mjpegb_decoder = {
     "mjpegb",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MJPEGB,
     sizeof(MJpegDecodeContext),
     ff_mjpeg_decode_init,

Modified: trunk/libavcodec/mjpegdec.c
==============================================================================
--- trunk/libavcodec/mjpegdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mjpegdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1533,7 +1533,7 @@ av_cold int ff_mjpeg_decode_end(AVCodecC
 
 AVCodec mjpeg_decoder = {
     "mjpeg",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MJPEG,
     sizeof(MJpegDecodeContext),
     ff_mjpeg_decode_init,
@@ -1547,7 +1547,7 @@ AVCodec mjpeg_decoder = {
 
 AVCodec thp_decoder = {
     "thp",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_THP,
     sizeof(MJpegDecodeContext),
     ff_mjpeg_decode_init,

Modified: trunk/libavcodec/mjpegenc.c
==============================================================================
--- trunk/libavcodec/mjpegenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mjpegenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -445,7 +445,7 @@ void ff_mjpeg_encode_mb(MpegEncContext *
 
 AVCodec mjpeg_encoder = {
     "mjpeg",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MJPEG,
     sizeof(MpegEncContext),
     MPV_encode_init,

Modified: trunk/libavcodec/mlpdec.c
==============================================================================
--- trunk/libavcodec/mlpdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mlpdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1136,7 +1136,7 @@ error:
 
 AVCodec mlp_decoder = {
     "mlp",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MLP,
     sizeof(MLPDecodeContext),
     mlp_decode_init,
@@ -1149,7 +1149,7 @@ AVCodec mlp_decoder = {
 #if CONFIG_TRUEHD_DECODER
 AVCodec truehd_decoder = {
     "truehd",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_TRUEHD,
     sizeof(MLPDecodeContext),
     mlp_decode_init,

Modified: trunk/libavcodec/mmvideo.c
==============================================================================
--- trunk/libavcodec/mmvideo.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mmvideo.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -200,7 +200,7 @@ static av_cold int mm_decode_end(AVCodec
 
 AVCodec mmvideo_decoder = {
     "mmvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MMVIDEO,
     sizeof(MmContext),
     mm_decode_init,

Modified: trunk/libavcodec/motionpixels.c
==============================================================================
--- trunk/libavcodec/motionpixels.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/motionpixels.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -304,7 +304,7 @@ static av_cold int mp_decode_end(AVCodec
 
 AVCodec motionpixels_decoder = {
     "motionpixels",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MOTIONPIXELS,
     sizeof(MotionPixelsContext),
     mp_decode_init,

Modified: trunk/libavcodec/mpc7.c
==============================================================================
--- trunk/libavcodec/mpc7.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mpc7.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -290,7 +290,7 @@ static void mpc7_decode_flush(AVCodecCon
 
 AVCodec mpc7_decoder = {
     "mpc7",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MUSEPACK7,
     sizeof(MPCContext),
     mpc7_decode_init,

Modified: trunk/libavcodec/mpc8.c
==============================================================================
--- trunk/libavcodec/mpc8.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mpc8.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -401,7 +401,7 @@ static int mpc8_decode_frame(AVCodecCont
 
 AVCodec mpc8_decoder = {
     "mpc8",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MUSEPACK8,
     sizeof(MPCContext),
     mpc8_decode_init,

Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mpeg12.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -2502,7 +2502,7 @@ static int mpeg_decode_end(AVCodecContex
 
 AVCodec mpeg1video_decoder = {
     "mpeg1video",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG1VIDEO,
     sizeof(Mpeg1Context),
     mpeg_decode_init,
@@ -2516,7 +2516,7 @@ AVCodec mpeg1video_decoder = {
 
 AVCodec mpeg2video_decoder = {
     "mpeg2video",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG2VIDEO,
     sizeof(Mpeg1Context),
     mpeg_decode_init,
@@ -2531,7 +2531,7 @@ AVCodec mpeg2video_decoder = {
 //legacy decoder
 AVCodec mpegvideo_decoder = {
     "mpegvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG2VIDEO,
     sizeof(Mpeg1Context),
     mpeg_decode_init,
@@ -2562,7 +2562,7 @@ static av_cold int mpeg_mc_decode_init(A
 
 AVCodec mpeg_xvmc_decoder = {
     "mpegvideo_xvmc",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG2VIDEO_XVMC,
     sizeof(Mpeg1Context),
     mpeg_mc_decode_init,
@@ -2579,7 +2579,7 @@ AVCodec mpeg_xvmc_decoder = {
 #if CONFIG_MPEG_VDPAU_DECODER
 AVCodec mpeg_vdpau_decoder = {
     "mpegvideo_vdpau",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG2VIDEO,
     sizeof(Mpeg1Context),
     mpeg_decode_init,
@@ -2595,7 +2595,7 @@ AVCodec mpeg_vdpau_decoder = {
 #if CONFIG_MPEG1_VDPAU_DECODER
 AVCodec mpeg1_vdpau_decoder = {
     "mpeg1video_vdpau",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG1VIDEO,
     sizeof(Mpeg1Context),
     mpeg_decode_init,

Modified: trunk/libavcodec/mpeg12enc.c
==============================================================================
--- trunk/libavcodec/mpeg12enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mpeg12enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -932,7 +932,7 @@ static void mpeg1_encode_block(MpegEncCo
 
 AVCodec mpeg1video_encoder = {
     "mpeg1video",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG1VIDEO,
     sizeof(MpegEncContext),
     encode_init,
@@ -946,7 +946,7 @@ AVCodec mpeg1video_encoder = {
 
 AVCodec mpeg2video_encoder = {
     "mpeg2video",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG2VIDEO,
     sizeof(MpegEncContext),
     encode_init,

Modified: trunk/libavcodec/mpeg4videodec.c
==============================================================================
--- trunk/libavcodec/mpeg4videodec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mpeg4videodec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -2236,7 +2236,7 @@ static av_cold int decode_init(AVCodecCo
 
 AVCodec mpeg4_decoder = {
     "mpeg4",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG4,
     sizeof(MpegEncContext),
     decode_init,
@@ -2253,7 +2253,7 @@ AVCodec mpeg4_decoder = {
 #if CONFIG_MPEG4_VDPAU_DECODER
 AVCodec mpeg4_vdpau_decoder = {
     "mpeg4_vdpau",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG4,
     sizeof(MpegEncContext),
     decode_init,

Modified: trunk/libavcodec/mpeg4videoenc.c
==============================================================================
--- trunk/libavcodec/mpeg4videoenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mpeg4videoenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1340,7 +1340,7 @@ void ff_mpeg4_encode_video_packet_header
 
 AVCodec mpeg4_encoder = {
     "mpeg4",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MPEG4,
     sizeof(MpegEncContext),
     encode_init,

Modified: trunk/libavcodec/mpegaudiodec.c
==============================================================================
--- trunk/libavcodec/mpegaudiodec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mpegaudiodec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -2485,7 +2485,7 @@ static int decode_frame_mp3on4(AVCodecCo
 AVCodec mp1_decoder =
 {
     "mp1",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MP1,
     sizeof(MPADecodeContext),
     decode_init,
@@ -2501,7 +2501,7 @@ AVCodec mp1_decoder =
 AVCodec mp2_decoder =
 {
     "mp2",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MP2,
     sizeof(MPADecodeContext),
     decode_init,
@@ -2517,7 +2517,7 @@ AVCodec mp2_decoder =
 AVCodec mp3_decoder =
 {
     "mp3",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MP3,
     sizeof(MPADecodeContext),
     decode_init,
@@ -2533,7 +2533,7 @@ AVCodec mp3_decoder =
 AVCodec mp3adu_decoder =
 {
     "mp3adu",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MP3ADU,
     sizeof(MPADecodeContext),
     decode_init,
@@ -2549,7 +2549,7 @@ AVCodec mp3adu_decoder =
 AVCodec mp3on4_decoder =
 {
     "mp3on4",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MP3ON4,
     sizeof(MP3On4DecodeContext),
     decode_init_mp3on4,

Modified: trunk/libavcodec/mpegaudioenc.c
==============================================================================
--- trunk/libavcodec/mpegaudioenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mpegaudioenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -790,7 +790,7 @@ static av_cold int MPA_encode_close(AVCo
 
 AVCodec mp2_encoder = {
     "mp2",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_MP2,
     sizeof(MpegAudioContext),
     MPA_encode_init,

Modified: trunk/libavcodec/mpegvideo_enc.c
==============================================================================
--- trunk/libavcodec/mpegvideo_enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/mpegvideo_enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -3771,7 +3771,7 @@ int dct_quantize_c(MpegEncContext *s,
 
 AVCodec h263_encoder = {
     "h263",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_H263,
     sizeof(MpegEncContext),
     MPV_encode_init,
@@ -3783,7 +3783,7 @@ AVCodec h263_encoder = {
 
 AVCodec h263p_encoder = {
     "h263p",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_H263P,
     sizeof(MpegEncContext),
     MPV_encode_init,
@@ -3795,7 +3795,7 @@ AVCodec h263p_encoder = {
 
 AVCodec msmpeg4v1_encoder = {
     "msmpeg4v1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MSMPEG4V1,
     sizeof(MpegEncContext),
     MPV_encode_init,
@@ -3807,7 +3807,7 @@ AVCodec msmpeg4v1_encoder = {
 
 AVCodec msmpeg4v2_encoder = {
     "msmpeg4v2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MSMPEG4V2,
     sizeof(MpegEncContext),
     MPV_encode_init,
@@ -3819,7 +3819,7 @@ AVCodec msmpeg4v2_encoder = {
 
 AVCodec msmpeg4v3_encoder = {
     "msmpeg4",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MSMPEG4V3,
     sizeof(MpegEncContext),
     MPV_encode_init,
@@ -3831,7 +3831,7 @@ AVCodec msmpeg4v3_encoder = {
 
 AVCodec wmv1_encoder = {
     "wmv1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_WMV1,
     sizeof(MpegEncContext),
     MPV_encode_init,

Modified: trunk/libavcodec/msmpeg4.c
==============================================================================
--- trunk/libavcodec/msmpeg4.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/msmpeg4.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1921,7 +1921,7 @@ int ff_msmpeg4_decode_motion(MpegEncCont
 
 AVCodec msmpeg4v1_decoder = {
     "msmpeg4v1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MSMPEG4V1,
     sizeof(MpegEncContext),
     ff_msmpeg4_decode_init,
@@ -1935,7 +1935,7 @@ AVCodec msmpeg4v1_decoder = {
 
 AVCodec msmpeg4v2_decoder = {
     "msmpeg4v2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MSMPEG4V2,
     sizeof(MpegEncContext),
     ff_msmpeg4_decode_init,
@@ -1949,7 +1949,7 @@ AVCodec msmpeg4v2_decoder = {
 
 AVCodec msmpeg4v3_decoder = {
     "msmpeg4",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MSMPEG4V3,
     sizeof(MpegEncContext),
     ff_msmpeg4_decode_init,
@@ -1963,7 +1963,7 @@ AVCodec msmpeg4v3_decoder = {
 
 AVCodec wmv1_decoder = {
     "wmv1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_WMV1,
     sizeof(MpegEncContext),
     ff_msmpeg4_decode_init,

Modified: trunk/libavcodec/msrle.c
==============================================================================
--- trunk/libavcodec/msrle.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/msrle.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -145,7 +145,7 @@ static av_cold int msrle_decode_end(AVCo
 
 AVCodec msrle_decoder = {
     "msrle",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MSRLE,
     sizeof(MsrleContext),
     msrle_decode_init,

Modified: trunk/libavcodec/msvideo1.c
==============================================================================
--- trunk/libavcodec/msvideo1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/msvideo1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -333,7 +333,7 @@ static av_cold int msvideo1_decode_end(A
 
 AVCodec msvideo1_decoder = {
     "msvideo1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_MSVIDEO1,
     sizeof(Msvideo1Context),
     msvideo1_decode_init,

Modified: trunk/libavcodec/nellymoserdec.c
==============================================================================
--- trunk/libavcodec/nellymoserdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/nellymoserdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -200,7 +200,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec nellymoser_decoder = {
     "nellymoser",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_NELLYMOSER,
     sizeof(NellyMoserDecodeContext),
     decode_init,

Modified: trunk/libavcodec/nellymoserenc.c
==============================================================================
--- trunk/libavcodec/nellymoserenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/nellymoserenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -384,7 +384,7 @@ static int encode_frame(AVCodecContext *
 
 AVCodec nellymoser_encoder = {
     .name = "nellymoser",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_NELLYMOSER,
     .priv_data_size = sizeof(NellyMoserEncodeContext),
     .init = encode_init,

Modified: trunk/libavcodec/nuv.c
==============================================================================
--- trunk/libavcodec/nuv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/nuv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -274,7 +274,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec nuv_decoder = {
     "nuv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_NUV,
     sizeof(NuvContext),
     decode_init,

Modified: trunk/libavcodec/options.c
==============================================================================
--- trunk/libavcodec/options.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/options.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -423,18 +423,18 @@ static const AVOption options[]={
 
 static const AVClass av_codec_context_class = { "AVCodecContext", context_to_name, options };
 
-void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type){
+void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType codec_type){
     int flags=0;
     memset(s, 0, sizeof(AVCodecContext));
 
     s->av_class= &av_codec_context_class;
 
     s->codec_type = codec_type;
-    if(codec_type == CODEC_TYPE_AUDIO)
+    if(codec_type == AVMEDIA_TYPE_AUDIO)
         flags= AV_OPT_FLAG_AUDIO_PARAM;
-    else if(codec_type == CODEC_TYPE_VIDEO)
+    else if(codec_type == AVMEDIA_TYPE_VIDEO)
         flags= AV_OPT_FLAG_VIDEO_PARAM;
-    else if(codec_type == CODEC_TYPE_SUBTITLE)
+    else if(codec_type == AVMEDIA_TYPE_SUBTITLE)
         flags= AV_OPT_FLAG_SUBTITLE_PARAM;
     av_opt_set_defaults2(s, flags, flags);
 
@@ -453,7 +453,7 @@ void avcodec_get_context_defaults2(AVCod
     s->reordered_opaque= AV_NOPTS_VALUE;
 }
 
-AVCodecContext *avcodec_alloc_context2(enum CodecType codec_type){
+AVCodecContext *avcodec_alloc_context2(enum AVMediaType codec_type){
     AVCodecContext *avctx= av_malloc(sizeof(AVCodecContext));
 
     if(avctx==NULL) return NULL;
@@ -464,10 +464,10 @@ AVCodecContext *avcodec_alloc_context2(e
 }
 
 void avcodec_get_context_defaults(AVCodecContext *s){
-    avcodec_get_context_defaults2(s, CODEC_TYPE_UNKNOWN);
+    avcodec_get_context_defaults2(s, AVMEDIA_TYPE_UNKNOWN);
 }
 
 AVCodecContext *avcodec_alloc_context(void){
-    return avcodec_alloc_context2(CODEC_TYPE_UNKNOWN);
+    return avcodec_alloc_context2(AVMEDIA_TYPE_UNKNOWN);
 }
 

Modified: trunk/libavcodec/pamenc.c
==============================================================================
--- trunk/libavcodec/pamenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pamenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -110,7 +110,7 @@ static int pam_encode_frame(AVCodecConte
 
 AVCodec pam_encoder = {
     "pam",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PAM,
     sizeof(PNMContext),
     ff_pnm_init,

Modified: trunk/libavcodec/pcm-mpeg.c
==============================================================================
--- trunk/libavcodec/pcm-mpeg.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pcm-mpeg.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -297,7 +297,7 @@ static int pcm_bluray_decode_frame(AVCod
 
 AVCodec pcm_bluray_decoder = {
     "pcm_bluray",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_PCM_BLURAY,
     0,
     NULL,

Modified: trunk/libavcodec/pcm.c
==============================================================================
--- trunk/libavcodec/pcm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pcm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -516,7 +516,7 @@ static int pcm_decode_frame(AVCodecConte
 #define PCM_ENCODER(id,sample_fmt_,name,long_name_) \
 AVCodec name ## _encoder = {                    \
     #name,                                      \
-    CODEC_TYPE_AUDIO,                           \
+    AVMEDIA_TYPE_AUDIO,                         \
     id,                                         \
     0,                                          \
     pcm_encode_init,                            \
@@ -534,7 +534,7 @@ AVCodec name ## _encoder = {            
 #define PCM_DECODER(id,sample_fmt_,name,long_name_)         \
 AVCodec name ## _decoder = {                    \
     #name,                                      \
-    CODEC_TYPE_AUDIO,                           \
+    AVMEDIA_TYPE_AUDIO,                         \
     id,                                         \
     sizeof(PCMDecode),                          \
     pcm_decode_init,                            \

Modified: trunk/libavcodec/pcx.c
==============================================================================
--- trunk/libavcodec/pcx.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pcx.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -244,7 +244,7 @@ static av_cold int pcx_end(AVCodecContex
 
 AVCodec pcx_decoder = {
     "pcx",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PCX,
     sizeof(PCXContext),
     pcx_init,

Modified: trunk/libavcodec/pcxenc.c
==============================================================================
--- trunk/libavcodec/pcxenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pcxenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -191,7 +191,7 @@ static int pcx_encode_frame(AVCodecConte
 
 AVCodec pcx_encoder = {
     "pcx",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PCX,
     sizeof(PCXContext),
     pcx_encode_init,

Modified: trunk/libavcodec/pgssubdec.c
==============================================================================
--- trunk/libavcodec/pgssubdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pgssubdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -454,7 +454,7 @@ static int decode(AVCodecContext *avctx,
 
 AVCodec pgssub_decoder = {
     "pgssub",
-    CODEC_TYPE_SUBTITLE,
+    AVMEDIA_TYPE_SUBTITLE,
     CODEC_ID_HDMV_PGS_SUBTITLE,
     sizeof(PGSSubContext),
     init_decoder,

Modified: trunk/libavcodec/pngdec.c
==============================================================================
--- trunk/libavcodec/pngdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pngdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -656,7 +656,7 @@ static av_cold int png_dec_end(AVCodecCo
 
 AVCodec png_decoder = {
     "png",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PNG,
     sizeof(PNGDecContext),
     png_dec_init,

Modified: trunk/libavcodec/pngenc.c
==============================================================================
--- trunk/libavcodec/pngenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pngenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -438,7 +438,7 @@ static av_cold int png_enc_init(AVCodecC
 
 AVCodec png_encoder = {
     "png",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PNG,
     sizeof(PNGEncContext),
     png_enc_init,

Modified: trunk/libavcodec/pnmdec.c
==============================================================================
--- trunk/libavcodec/pnmdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pnmdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -190,7 +190,7 @@ static int pnm_decode_frame(AVCodecConte
 #if CONFIG_PGM_DECODER
 AVCodec pgm_decoder = {
     "pgm",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PGM,
     sizeof(PNMContext),
     ff_pnm_init,
@@ -206,7 +206,7 @@ AVCodec pgm_decoder = {
 #if CONFIG_PGMYUV_DECODER
 AVCodec pgmyuv_decoder = {
     "pgmyuv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PGMYUV,
     sizeof(PNMContext),
     ff_pnm_init,
@@ -222,7 +222,7 @@ AVCodec pgmyuv_decoder = {
 #if CONFIG_PPM_DECODER
 AVCodec ppm_decoder = {
     "ppm",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PPM,
     sizeof(PNMContext),
     ff_pnm_init,
@@ -238,7 +238,7 @@ AVCodec ppm_decoder = {
 #if CONFIG_PBM_DECODER
 AVCodec pbm_decoder = {
     "pbm",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PBM,
     sizeof(PNMContext),
     ff_pnm_init,
@@ -254,7 +254,7 @@ AVCodec pbm_decoder = {
 #if CONFIG_PAM_DECODER
 AVCodec pam_decoder = {
     "pam",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PAM,
     sizeof(PNMContext),
     ff_pnm_init,

Modified: trunk/libavcodec/pnmenc.c
==============================================================================
--- trunk/libavcodec/pnmenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/pnmenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -115,7 +115,7 @@ static int pnm_encode_frame(AVCodecConte
 #if CONFIG_PGM_ENCODER
 AVCodec pgm_encoder = {
     "pgm",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PGM,
     sizeof(PNMContext),
     ff_pnm_init,
@@ -128,7 +128,7 @@ AVCodec pgm_encoder = {
 #if CONFIG_PGMYUV_ENCODER
 AVCodec pgmyuv_encoder = {
     "pgmyuv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PGMYUV,
     sizeof(PNMContext),
     ff_pnm_init,
@@ -141,7 +141,7 @@ AVCodec pgmyuv_encoder = {
 #if CONFIG_PPM_ENCODER
 AVCodec ppm_encoder = {
     "ppm",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PPM,
     sizeof(PNMContext),
     ff_pnm_init,
@@ -154,7 +154,7 @@ AVCodec ppm_encoder = {
 #if CONFIG_PBM_ENCODER
 AVCodec pbm_encoder = {
     "pbm",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PBM,
     sizeof(PNMContext),
     ff_pnm_init,

Modified: trunk/libavcodec/ptx.c
==============================================================================
--- trunk/libavcodec/ptx.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/ptx.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -107,7 +107,7 @@ static av_cold int ptx_end(AVCodecContex
 
 AVCodec ptx_decoder = {
     "ptx",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_PTX,
     sizeof(PTXContext),
     ptx_init,

Modified: trunk/libavcodec/qcelpdec.c
==============================================================================
--- trunk/libavcodec/qcelpdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/qcelpdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -813,7 +813,7 @@ erasure:
 AVCodec qcelp_decoder =
 {
     .name   = "qcelp",
-    .type   = CODEC_TYPE_AUDIO,
+    .type   = AVMEDIA_TYPE_AUDIO,
     .id     = CODEC_ID_QCELP,
     .init   = qcelp_decode_init,
     .decode = qcelp_decode_frame,

Modified: trunk/libavcodec/qdm2.c
==============================================================================
--- trunk/libavcodec/qdm2.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/qdm2.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1974,7 +1974,7 @@ static int qdm2_decode_frame(AVCodecCont
 AVCodec qdm2_decoder =
 {
     .name = "qdm2",
-    .type = CODEC_TYPE_AUDIO,
+    .type = AVMEDIA_TYPE_AUDIO,
     .id = CODEC_ID_QDM2,
     .priv_data_size = sizeof(QDM2Context),
     .init = qdm2_decode_init,

Modified: trunk/libavcodec/qdrw.c
==============================================================================
--- trunk/libavcodec/qdrw.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/qdrw.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -152,7 +152,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec qdraw_decoder = {
     "qdraw",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_QDRAW,
     sizeof(QdrawContext),
     decode_init,

Modified: trunk/libavcodec/qpeg.c
==============================================================================
--- trunk/libavcodec/qpeg.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/qpeg.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -313,7 +313,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec qpeg_decoder = {
     "qpeg",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_QPEG,
     sizeof(QpegContext),
     decode_init,

Modified: trunk/libavcodec/qtrle.c
==============================================================================
--- trunk/libavcodec/qtrle.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/qtrle.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -539,7 +539,7 @@ static av_cold int qtrle_decode_end(AVCo
 
 AVCodec qtrle_decoder = {
     "qtrle",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_QTRLE,
     sizeof(QtrleContext),
     qtrle_decode_init,

Modified: trunk/libavcodec/qtrleenc.c
==============================================================================
--- trunk/libavcodec/qtrleenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/qtrleenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -322,7 +322,7 @@ static av_cold int qtrle_encode_end(AVCo
 
 AVCodec qtrle_encoder = {
     "qtrle",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_QTRLE,
     sizeof(QtrleEncContext),
     qtrle_encode_init,

Modified: trunk/libavcodec/r210dec.c
==============================================================================
--- trunk/libavcodec/r210dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/r210dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -92,7 +92,7 @@ static av_cold int decode_close(AVCodecC
 
 AVCodec r210_decoder = {
     "r210",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_R210,
     0,
     decode_init,

Modified: trunk/libavcodec/ra144.c
==============================================================================
--- trunk/libavcodec/ra144.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/ra144.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -353,7 +353,7 @@ static int ra144_decode_frame(AVCodecCon
 AVCodec ra_144_decoder =
 {
     "real_144",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_RA_144,
     sizeof(RA144Context),
     ra144_decode_init,

Modified: trunk/libavcodec/ra288.c
==============================================================================
--- trunk/libavcodec/ra288.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/ra288.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -206,7 +206,7 @@ static int ra288_decode_frame(AVCodecCon
 AVCodec ra_288_decoder =
 {
     "real_288",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_RA_288,
     sizeof(RA288Context),
     ra288_decode_init,

Modified: trunk/libavcodec/rawdec.c
==============================================================================
--- trunk/libavcodec/rawdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/rawdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -185,7 +185,7 @@ static av_cold int raw_close_decoder(AVC
 
 AVCodec rawvideo_decoder = {
     "rawvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RAWVIDEO,
     sizeof(RawVideoContext),
     raw_init_decoder,

Modified: trunk/libavcodec/rawenc.c
==============================================================================
--- trunk/libavcodec/rawenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/rawenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -57,7 +57,7 @@ static int raw_encode(AVCodecContext *av
 
 AVCodec rawvideo_encoder = {
     "rawvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RAWVIDEO,
     sizeof(AVFrame),
     raw_init_encoder,

Modified: trunk/libavcodec/rl2.c
==============================================================================
--- trunk/libavcodec/rl2.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/rl2.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -230,7 +230,7 @@ static av_cold int rl2_decode_end(AVCode
 
 AVCodec rl2_decoder = {
     "rl2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RL2,
     sizeof(Rl2Context),
     rl2_decode_init,

Modified: trunk/libavcodec/roqaudioenc.c
==============================================================================
--- trunk/libavcodec/roqaudioenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/roqaudioenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -155,7 +155,7 @@ static av_cold int roq_dpcm_encode_close
 
 AVCodec roq_dpcm_encoder = {
     "roq_dpcm",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_ROQ_DPCM,
     sizeof(ROQDPCMContext),
     roq_dpcm_encode_init,

Modified: trunk/libavcodec/roqvideodec.c
==============================================================================
--- trunk/libavcodec/roqvideodec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/roqvideodec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -212,7 +212,7 @@ static av_cold int roq_decode_end(AVCode
 
 AVCodec roq_decoder = {
     "roqvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ROQ,
     sizeof(RoqContext),
     roq_decode_init,

Modified: trunk/libavcodec/roqvideoenc.c
==============================================================================
--- trunk/libavcodec/roqvideoenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/roqvideoenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1057,7 +1057,7 @@ static int roq_encode_end(AVCodecContext
 AVCodec roq_encoder =
 {
     "roqvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ROQ,
     sizeof(RoqContext),
     roq_encode_init,

Modified: trunk/libavcodec/rpza.c
==============================================================================
--- trunk/libavcodec/rpza.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/rpza.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -277,7 +277,7 @@ static av_cold int rpza_decode_end(AVCod
 
 AVCodec rpza_decoder = {
     "rpza",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RPZA,
     sizeof(RpzaContext),
     rpza_decode_init,

Modified: trunk/libavcodec/rv10.c
==============================================================================
--- trunk/libavcodec/rv10.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/rv10.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -708,7 +708,7 @@ static int rv10_decode_frame(AVCodecCont
 
 AVCodec rv10_decoder = {
     "rv10",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RV10,
     sizeof(MpegEncContext),
     rv10_decode_init,
@@ -722,7 +722,7 @@ AVCodec rv10_decoder = {
 
 AVCodec rv20_decoder = {
     "rv20",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RV20,
     sizeof(MpegEncContext),
     rv10_decode_init,

Modified: trunk/libavcodec/rv10enc.c
==============================================================================
--- trunk/libavcodec/rv10enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/rv10enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -58,7 +58,7 @@ void rv10_encode_picture_header(MpegEncC
 
 AVCodec rv10_encoder = {
     "rv10",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RV10,
     sizeof(MpegEncContext),
     MPV_encode_init,

Modified: trunk/libavcodec/rv20enc.c
==============================================================================
--- trunk/libavcodec/rv20enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/rv20enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -59,7 +59,7 @@ void rv20_encode_picture_header(MpegEncC
 
 AVCodec rv20_encoder = {
     "rv20",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RV20,
     sizeof(MpegEncContext),
     MPV_encode_init,

Modified: trunk/libavcodec/rv30.c
==============================================================================
--- trunk/libavcodec/rv30.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/rv30.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -268,7 +268,7 @@ static av_cold int rv30_decode_init(AVCo
 
 AVCodec rv30_decoder = {
     "rv30",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RV30,
     sizeof(RV34DecContext),
     rv30_decode_init,

Modified: trunk/libavcodec/rv40.c
==============================================================================
--- trunk/libavcodec/rv40.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/rv40.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -668,7 +668,7 @@ static av_cold int rv40_decode_init(AVCo
 
 AVCodec rv40_decoder = {
     "rv40",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_RV40,
     sizeof(RV34DecContext),
     rv40_decode_init,

Modified: trunk/libavcodec/sgidec.c
==============================================================================
--- trunk/libavcodec/sgidec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/sgidec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -260,7 +260,7 @@ static av_cold int sgi_end(AVCodecContex
 
 AVCodec sgi_decoder = {
     "sgi",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SGI,
     sizeof(SgiState),
     sgi_init,

Modified: trunk/libavcodec/sgienc.c
==============================================================================
--- trunk/libavcodec/sgienc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/sgienc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -161,7 +161,7 @@ static int encode_frame(AVCodecContext *
 
 AVCodec sgi_encoder = {
     "sgi",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SGI,
     sizeof(SgiContext),
     encode_init,

Modified: trunk/libavcodec/shorten.c
==============================================================================
--- trunk/libavcodec/shorten.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/shorten.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -527,7 +527,7 @@ static void shorten_flush(AVCodecContext
 
 AVCodec shorten_decoder = {
     "shorten",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_SHORTEN,
     sizeof(ShortenContext),
     shorten_decode_init,

Modified: trunk/libavcodec/sipr.c
==============================================================================
--- trunk/libavcodec/sipr.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/sipr.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -579,7 +579,7 @@ static int sipr_decode_frame(AVCodecCont
 
 AVCodec sipr_decoder = {
     "sipr",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_SIPR,
     sizeof(SiprContext),
     sipr_decoder_init,

Modified: trunk/libavcodec/smacker.c
==============================================================================
--- trunk/libavcodec/smacker.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/smacker.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -691,7 +691,7 @@ static int smka_decode_frame(AVCodecCont
 
 AVCodec smacker_decoder = {
     "smackvid",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SMACKVIDEO,
     sizeof(SmackVContext),
     decode_init,
@@ -704,7 +704,7 @@ AVCodec smacker_decoder = {
 
 AVCodec smackaud_decoder = {
     "smackaud",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_SMACKAUDIO,
     0,
     smka_decode_init,

Modified: trunk/libavcodec/smc.c
==============================================================================
--- trunk/libavcodec/smc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/smc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -473,7 +473,7 @@ static av_cold int smc_decode_end(AVCode
 
 AVCodec smc_decoder = {
     "smc",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SMC,
     sizeof(SmcContext),
     smc_decode_init,

Modified: trunk/libavcodec/snow.c
==============================================================================
--- trunk/libavcodec/snow.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/snow.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -2237,7 +2237,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec snow_decoder = {
     "snow",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SNOW,
     sizeof(SnowContext),
     decode_init,
@@ -3988,7 +3988,7 @@ static av_cold int encode_end(AVCodecCon
 
 AVCodec snow_encoder = {
     "snow",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SNOW,
     sizeof(SnowContext),
     encode_init,

Modified: trunk/libavcodec/sonic.c
==============================================================================
--- trunk/libavcodec/sonic.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/sonic.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -937,7 +937,7 @@ static int sonic_decode_frame(AVCodecCon
 
 AVCodec sonic_decoder = {
     "sonic",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_SONIC,
     sizeof(SonicContext),
     sonic_decode_init,
@@ -951,7 +951,7 @@ AVCodec sonic_decoder = {
 #if CONFIG_SONIC_ENCODER
 AVCodec sonic_encoder = {
     "sonic",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_SONIC,
     sizeof(SonicContext),
     sonic_encode_init,
@@ -965,7 +965,7 @@ AVCodec sonic_encoder = {
 #if CONFIG_SONIC_LS_ENCODER
 AVCodec sonic_ls_encoder = {
     "sonicls",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_SONIC_LS,
     sizeof(SonicContext),
     sonic_encode_init,

Modified: trunk/libavcodec/sp5xdec.c
==============================================================================
--- trunk/libavcodec/sp5xdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/sp5xdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -195,7 +195,7 @@ static int sp5x_decode_frame(AVCodecCont
 
 AVCodec sp5x_decoder = {
     "sp5x",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SP5X,
     sizeof(MJpegDecodeContext),
     ff_mjpeg_decode_init,
@@ -209,7 +209,7 @@ AVCodec sp5x_decoder = {
 
 AVCodec amv_decoder = {
     "amv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_AMV,
     sizeof(MJpegDecodeContext),
     ff_mjpeg_decode_init,

Modified: trunk/libavcodec/sunrast.c
==============================================================================
--- trunk/libavcodec/sunrast.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/sunrast.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -185,7 +185,7 @@ static av_cold int sunrast_end(AVCodecCo
 
 AVCodec sunrast_decoder = {
     "sunrast",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SUNRAST,
     sizeof(SUNRASTContext),
     sunrast_init,

Modified: trunk/libavcodec/svq1dec.c
==============================================================================
--- trunk/libavcodec/svq1dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/svq1dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -828,7 +828,7 @@ static av_cold int svq1_decode_end(AVCod
 
 AVCodec svq1_decoder = {
     "svq1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SVQ1,
     sizeof(MpegEncContext),
     svq1_decode_init,

Modified: trunk/libavcodec/svq1enc.c
==============================================================================
--- trunk/libavcodec/svq1enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/svq1enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -574,7 +574,7 @@ static av_cold int svq1_encode_end(AVCod
 
 AVCodec svq1_encoder = {
     "svq1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SVQ1,
     sizeof(SVQ1Context),
     svq1_encode_init,

Modified: trunk/libavcodec/svq3.c
==============================================================================
--- trunk/libavcodec/svq3.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/svq3.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1071,7 +1071,7 @@ static int svq3_decode_frame(AVCodecCont
 
 AVCodec svq3_decoder = {
     "svq3",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_SVQ3,
     sizeof(H264Context),
     svq3_decode_init,

Modified: trunk/libavcodec/targa.c
==============================================================================
--- trunk/libavcodec/targa.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/targa.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -243,7 +243,7 @@ static av_cold int targa_end(AVCodecCont
 
 AVCodec targa_decoder = {
     "targa",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TARGA,
     sizeof(TargaContext),
     targa_init,

Modified: trunk/libavcodec/targaenc.c
==============================================================================
--- trunk/libavcodec/targaenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/targaenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -153,7 +153,7 @@ static av_cold int targa_encode_init(AVC
 
 AVCodec targa_encoder = {
     .name = "targa",
-    .type = CODEC_TYPE_VIDEO,
+    .type = AVMEDIA_TYPE_VIDEO,
     .id = CODEC_ID_TARGA,
     .priv_data_size = sizeof(TargaContext),
     .init = targa_encode_init,

Modified: trunk/libavcodec/tiertexseqv.c
==============================================================================
--- trunk/libavcodec/tiertexseqv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/tiertexseqv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -221,7 +221,7 @@ static av_cold int seqvideo_decode_end(A
 
 AVCodec tiertexseqvideo_decoder = {
     "tiertexseqvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TIERTEXSEQVIDEO,
     sizeof(SeqVideoContext),
     seqvideo_decode_init,

Modified: trunk/libavcodec/tiff.c
==============================================================================
--- trunk/libavcodec/tiff.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/tiff.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -592,7 +592,7 @@ static av_cold int tiff_end(AVCodecConte
 
 AVCodec tiff_decoder = {
     "tiff",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TIFF,
     sizeof(TiffContext),
     tiff_init,

Modified: trunk/libavcodec/tiffenc.c
==============================================================================
--- trunk/libavcodec/tiffenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/tiffenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -444,7 +444,7 @@ fail:
 
 AVCodec tiff_encoder = {
     "tiff",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TIFF,
     sizeof(TiffEncoderContext),
     NULL,

Modified: trunk/libavcodec/tmv.c
==============================================================================
--- trunk/libavcodec/tmv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/tmv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -100,7 +100,7 @@ static av_cold int tmv_decode_close(AVCo
 
 AVCodec tmv_decoder = {
     .name           = "tmv",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_TMV,
     .priv_data_size = sizeof(TMVContext),
     .close          = tmv_decode_close,

Modified: trunk/libavcodec/truemotion1.c
==============================================================================
--- trunk/libavcodec/truemotion1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/truemotion1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -892,7 +892,7 @@ static av_cold int truemotion1_decode_en
 
 AVCodec truemotion1_decoder = {
     "truemotion1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TRUEMOTION1,
     sizeof(TrueMotion1Context),
     truemotion1_decode_init,

Modified: trunk/libavcodec/truemotion2.c
==============================================================================
--- trunk/libavcodec/truemotion2.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/truemotion2.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -872,7 +872,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec truemotion2_decoder = {
     "truemotion2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TRUEMOTION2,
     sizeof(TM2Context),
     decode_init,

Modified: trunk/libavcodec/truespeech.c
==============================================================================
--- trunk/libavcodec/truespeech.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/truespeech.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -378,7 +378,7 @@ static int truespeech_decode_frame(AVCod
 
 AVCodec truespeech_decoder = {
     "truespeech",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_TRUESPEECH,
     sizeof(TSContext),
     truespeech_decode_init,

Modified: trunk/libavcodec/tscc.c
==============================================================================
--- trunk/libavcodec/tscc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/tscc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -199,7 +199,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec tscc_decoder = {
         "camtasia",
-        CODEC_TYPE_VIDEO,
+        AVMEDIA_TYPE_VIDEO,
         CODEC_ID_TSCC,
         sizeof(CamtasiaContext),
         decode_init,

Modified: trunk/libavcodec/tta.c
==============================================================================
--- trunk/libavcodec/tta.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/tta.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -449,7 +449,7 @@ static av_cold int tta_decode_close(AVCo
 
 AVCodec tta_decoder = {
     "tta",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_TTA,
     sizeof(TTAContext),
     tta_decode_init,

Modified: trunk/libavcodec/twinvq.c
==============================================================================
--- trunk/libavcodec/twinvq.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/twinvq.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1119,7 +1119,7 @@ static av_cold int twin_decode_close(AVC
 AVCodec twinvq_decoder =
 {
     "twinvq",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_TWINVQ,
     sizeof(TwinContext),
     twin_decode_init,

Modified: trunk/libavcodec/txd.c
==============================================================================
--- trunk/libavcodec/txd.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/txd.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -156,7 +156,7 @@ static av_cold int txd_end(AVCodecContex
 
 AVCodec txd_decoder = {
     "txd",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_TXD,
     sizeof(TXDContext),
     txd_init,

Modified: trunk/libavcodec/ulti.c
==============================================================================
--- trunk/libavcodec/ulti.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/ulti.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -406,7 +406,7 @@ static int ulti_decode_frame(AVCodecCont
 
 AVCodec ulti_decoder = {
     "ultimotion",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ULTI,
     sizeof(UltimotionDecodeContext),
     ulti_decode_init,

Modified: trunk/libavcodec/utils.c
==============================================================================
--- trunk/libavcodec/utils.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/utils.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -497,7 +497,7 @@ int attribute_align_arg avcodec_open(AVC
     }
 
     avctx->codec = codec;
-    if ((avctx->codec_type == CODEC_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
+    if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
         avctx->codec_id == CODEC_ID_NONE) {
         avctx->codec_type = codec->type;
         avctx->codec_id   = codec->id;
@@ -775,20 +775,20 @@ static int get_bit_rate(AVCodecContext *
     int bits_per_sample;
 
     switch(ctx->codec_type) {
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         bit_rate = ctx->bit_rate;
         break;
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         bits_per_sample = av_get_bits_per_sample(ctx->codec_id);
         bit_rate = bits_per_sample ? ctx->sample_rate * ctx->channels * bits_per_sample : ctx->bit_rate;
         break;
-    case CODEC_TYPE_DATA:
+    case AVMEDIA_TYPE_DATA:
         bit_rate = ctx->bit_rate;
         break;
-    case CODEC_TYPE_SUBTITLE:
+    case AVMEDIA_TYPE_SUBTITLE:
         bit_rate = ctx->bit_rate;
         break;
-    case CODEC_TYPE_ATTACHMENT:
+    case AVMEDIA_TYPE_ATTACHMENT:
         bit_rate = ctx->bit_rate;
         break;
     default:
@@ -836,7 +836,7 @@ void avcodec_string(char *buf, int buf_s
     }
 
     switch(enc->codec_type) {
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         snprintf(buf, buf_size,
                  "Video: %s%s",
                  codec_name, enc->mb_decision ? " (hq)" : "");
@@ -871,7 +871,7 @@ void avcodec_string(char *buf, int buf_s
                      ", q=%d-%d", enc->qmin, enc->qmax);
         }
         break;
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         snprintf(buf, buf_size,
                  "Audio: %s",
                  codec_name);
@@ -886,13 +886,13 @@ void avcodec_string(char *buf, int buf_s
                      ", %s", avcodec_get_sample_fmt_name(enc->sample_fmt));
         }
         break;
-    case CODEC_TYPE_DATA:
+    case AVMEDIA_TYPE_DATA:
         snprintf(buf, buf_size, "Data: %s", codec_name);
         break;
-    case CODEC_TYPE_SUBTITLE:
+    case AVMEDIA_TYPE_SUBTITLE:
         snprintf(buf, buf_size, "Subtitle: %s", codec_name);
         break;
-    case CODEC_TYPE_ATTACHMENT:
+    case AVMEDIA_TYPE_ATTACHMENT:
         snprintf(buf, buf_size, "Attachment: %s", codec_name);
         break;
     default:

Modified: trunk/libavcodec/v210dec.c
==============================================================================
--- trunk/libavcodec/v210dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/v210dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -122,7 +122,7 @@ static av_cold int decode_close(AVCodecC
 
 AVCodec v210_decoder = {
     "v210",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_V210,
     0,
     decode_init,

Modified: trunk/libavcodec/v210enc.c
==============================================================================
--- trunk/libavcodec/v210enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/v210enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -119,7 +119,7 @@ static av_cold int encode_close(AVCodecC
 
 AVCodec v210_encoder = {
     "v210",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_V210,
     0,
     encode_init,

Modified: trunk/libavcodec/v210x.c
==============================================================================
--- trunk/libavcodec/v210x.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/v210x.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -134,7 +134,7 @@ static av_cold int decode_close(AVCodecC
 
 AVCodec v210x_decoder = {
     "v210x",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_V210X,
     0,
     decode_init,

Modified: trunk/libavcodec/vaapi_h264.c
==============================================================================
--- trunk/libavcodec/vaapi_h264.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vaapi_h264.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -336,7 +336,7 @@ static int decode_slice(AVCodecContext *
 
 AVHWAccel h264_vaapi_hwaccel = {
     .name           = "h264_vaapi",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_H264,
     .pix_fmt        = PIX_FMT_VAAPI_VLD,
     .capabilities   = 0,

Modified: trunk/libavcodec/vaapi_mpeg2.c
==============================================================================
--- trunk/libavcodec/vaapi_mpeg2.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vaapi_mpeg2.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -140,7 +140,7 @@ static int vaapi_mpeg2_decode_slice(AVCo
 
 AVHWAccel mpeg2_vaapi_hwaccel = {
     .name           = "mpeg2_vaapi",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_MPEG2VIDEO,
     .pix_fmt        = PIX_FMT_VAAPI_VLD,
     .capabilities   = 0,

Modified: trunk/libavcodec/vaapi_mpeg4.c
==============================================================================
--- trunk/libavcodec/vaapi_mpeg4.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vaapi_mpeg4.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -151,7 +151,7 @@ static int vaapi_mpeg4_decode_slice(AVCo
 #if CONFIG_MPEG4_VAAPI_HWACCEL
 AVHWAccel mpeg4_vaapi_hwaccel = {
     .name           = "mpeg4_vaapi",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_MPEG4,
     .pix_fmt        = PIX_FMT_VAAPI_VLD,
     .capabilities   = 0,
@@ -165,7 +165,7 @@ AVHWAccel mpeg4_vaapi_hwaccel = {
 #if CONFIG_H263_VAAPI_HWACCEL
 AVHWAccel h263_vaapi_hwaccel = {
     .name           = "h263_vaapi",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_H263,
     .pix_fmt        = PIX_FMT_VAAPI_VLD,
     .capabilities   = 0,

Modified: trunk/libavcodec/vaapi_vc1.c
==============================================================================
--- trunk/libavcodec/vaapi_vc1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vaapi_vc1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -328,7 +328,7 @@ static int vaapi_vc1_decode_slice(AVCode
 #if CONFIG_WMV3_VAAPI_HWACCEL
 AVHWAccel wmv3_vaapi_hwaccel = {
     .name           = "wmv3_vaapi",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_WMV3,
     .pix_fmt        = PIX_FMT_VAAPI_VLD,
     .capabilities   = 0,
@@ -341,7 +341,7 @@ AVHWAccel wmv3_vaapi_hwaccel = {
 
 AVHWAccel vc1_vaapi_hwaccel = {
     .name           = "vc1_vaapi",
-    .type           = CODEC_TYPE_VIDEO,
+    .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_VC1,
     .pix_fmt        = PIX_FMT_VAAPI_VLD,
     .capabilities   = 0,

Modified: trunk/libavcodec/vb.c
==============================================================================
--- trunk/libavcodec/vb.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vb.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -289,7 +289,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec vb_decoder = {
     "vb",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VB,
     sizeof(VBDecContext),
     decode_init,

Modified: trunk/libavcodec/vc1dec.c
==============================================================================
--- trunk/libavcodec/vc1dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vc1dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -3319,7 +3319,7 @@ static av_cold int vc1_decode_end(AVCode
 
 AVCodec vc1_decoder = {
     "vc1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VC1,
     sizeof(VC1Context),
     vc1_decode_init,
@@ -3335,7 +3335,7 @@ AVCodec vc1_decoder = {
 #if CONFIG_WMV3_DECODER
 AVCodec wmv3_decoder = {
     "wmv3",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_WMV3,
     sizeof(VC1Context),
     vc1_decode_init,
@@ -3352,7 +3352,7 @@ AVCodec wmv3_decoder = {
 #if CONFIG_WMV3_VDPAU_DECODER
 AVCodec wmv3_vdpau_decoder = {
     "wmv3_vdpau",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_WMV3,
     sizeof(VC1Context),
     vc1_decode_init,
@@ -3369,7 +3369,7 @@ AVCodec wmv3_vdpau_decoder = {
 #if CONFIG_VC1_VDPAU_DECODER
 AVCodec vc1_vdpau_decoder = {
     "vc1_vdpau",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VC1,
     sizeof(VC1Context),
     vc1_decode_init,

Modified: trunk/libavcodec/vcr1.c
==============================================================================
--- trunk/libavcodec/vcr1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vcr1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -178,7 +178,7 @@ static av_cold int encode_init(AVCodecCo
 
 AVCodec vcr1_decoder = {
     "vcr1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VCR1,
     sizeof(VCR1Context),
     decode_init,
@@ -192,7 +192,7 @@ AVCodec vcr1_decoder = {
 #if CONFIG_VCR1_ENCODER
 AVCodec vcr1_encoder = {
     "vcr1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VCR1,
     sizeof(VCR1Context),
     encode_init,

Modified: trunk/libavcodec/vmdav.c
==============================================================================
--- trunk/libavcodec/vmdav.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vmdav.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -567,7 +567,7 @@ static int vmdaudio_decode_frame(AVCodec
 
 AVCodec vmdvideo_decoder = {
     "vmdvideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VMDVIDEO,
     sizeof(VmdVideoContext),
     vmdvideo_decode_init,
@@ -580,7 +580,7 @@ AVCodec vmdvideo_decoder = {
 
 AVCodec vmdaudio_decoder = {
     "vmdaudio",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_VMDAUDIO,
     sizeof(VmdAudioContext),
     vmdaudio_decode_init,

Modified: trunk/libavcodec/vmnc.c
==============================================================================
--- trunk/libavcodec/vmnc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vmnc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -510,7 +510,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec vmnc_decoder = {
     "vmnc",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VMNC,
     sizeof(VmncContext),
     decode_init,

Modified: trunk/libavcodec/vorbis_dec.c
==============================================================================
--- trunk/libavcodec/vorbis_dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vorbis_dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1645,7 +1645,7 @@ static av_cold int vorbis_decode_close(A
 
 AVCodec vorbis_decoder = {
     "vorbis",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_VORBIS,
     sizeof(vorbis_context),
     vorbis_decode_init,

Modified: trunk/libavcodec/vorbis_enc.c
==============================================================================
--- trunk/libavcodec/vorbis_enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vorbis_enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1093,7 +1093,7 @@ static av_cold int vorbis_encode_close(A
 
 AVCodec vorbis_encoder = {
     "vorbis",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_VORBIS,
     sizeof(vorbis_enc_context),
     vorbis_encode_init,

Modified: trunk/libavcodec/vp3.c
==============================================================================
--- trunk/libavcodec/vp3.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vp3.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -2191,7 +2191,7 @@ static av_cold int theora_decode_init(AV
 
 AVCodec theora_decoder = {
     "theora",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_THEORA,
     sizeof(Vp3DecodeContext),
     theora_decode_init,
@@ -2206,7 +2206,7 @@ AVCodec theora_decoder = {
 
 AVCodec vp3_decoder = {
     "vp3",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VP3,
     sizeof(Vp3DecodeContext),
     vp3_decode_init,

Modified: trunk/libavcodec/vp5.c
==============================================================================
--- trunk/libavcodec/vp5.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vp5.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -286,7 +286,7 @@ static av_cold int vp5_decode_init(AVCod
 
 AVCodec vp5_decoder = {
     "vp5",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VP5,
     sizeof(VP56Context),
     vp5_decode_init,

Modified: trunk/libavcodec/vp6.c
==============================================================================
--- trunk/libavcodec/vp6.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vp6.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -621,7 +621,7 @@ static av_cold int vp6_decode_free(AVCod
 
 AVCodec vp6_decoder = {
     "vp6",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VP6,
     sizeof(VP56Context),
     vp6_decode_init,
@@ -635,7 +635,7 @@ AVCodec vp6_decoder = {
 /* flash version, not flipped upside-down */
 AVCodec vp6f_decoder = {
     "vp6f",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VP6F,
     sizeof(VP56Context),
     vp6_decode_init,
@@ -649,7 +649,7 @@ AVCodec vp6f_decoder = {
 /* flash version, not flipped upside-down, with alpha channel */
 AVCodec vp6a_decoder = {
     "vp6a",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VP6A,
     sizeof(VP56Context),
     vp6_decode_init,

Modified: trunk/libavcodec/vqavideo.c
==============================================================================
--- trunk/libavcodec/vqavideo.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/vqavideo.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -610,7 +610,7 @@ static av_cold int vqa_decode_end(AVCode
 
 AVCodec vqa_decoder = {
     "vqavideo",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_WS_VQA,
     sizeof(VqaContext),
     vqa_decode_init,

Modified: trunk/libavcodec/wavpack.c
==============================================================================
--- trunk/libavcodec/wavpack.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/wavpack.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1020,7 +1020,7 @@ static int wavpack_decode_frame(AVCodecC
 
 AVCodec wavpack_decoder = {
     "wavpack",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_WAVPACK,
     sizeof(WavpackContext),
     wavpack_decode_init,

Modified: trunk/libavcodec/wmadec.c
==============================================================================
--- trunk/libavcodec/wmadec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/wmadec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -942,7 +942,7 @@ static av_cold void flush(AVCodecContext
 AVCodec wmav1_decoder =
 {
     "wmav1",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_WMAV1,
     sizeof(WMACodecContext),
     wma_decode_init,
@@ -956,7 +956,7 @@ AVCodec wmav1_decoder =
 AVCodec wmav2_decoder =
 {
     "wmav2",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_WMAV2,
     sizeof(WMACodecContext),
     wma_decode_init,

Modified: trunk/libavcodec/wmaenc.c
==============================================================================
--- trunk/libavcodec/wmaenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/wmaenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -386,7 +386,7 @@ static int encode_superframe(AVCodecCont
 AVCodec wmav1_encoder =
 {
     "wmav1",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_WMAV1,
     sizeof(WMACodecContext),
     encode_init,
@@ -399,7 +399,7 @@ AVCodec wmav1_encoder =
 AVCodec wmav2_encoder =
 {
     "wmav2",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_WMAV2,
     sizeof(WMACodecContext),
     encode_init,

Modified: trunk/libavcodec/wmaprodec.c
==============================================================================
--- trunk/libavcodec/wmaprodec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/wmaprodec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1565,7 +1565,7 @@ static void flush(AVCodecContext *avctx)
  */
 AVCodec wmapro_decoder = {
     "wmapro",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_WMAPRO,
     sizeof(WMAProDecodeCtx),
     decode_init,

Modified: trunk/libavcodec/wmavoice.c
==============================================================================
--- trunk/libavcodec/wmavoice.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/wmavoice.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1555,7 +1555,7 @@ static av_cold void wmavoice_flush(AVCod
 
 AVCodec wmavoice_decoder = {
     "wmavoice",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_WMAVOICE,
     sizeof(WMAVoiceContext),
     wmavoice_decode_init,

Modified: trunk/libavcodec/wmv2dec.c
==============================================================================
--- trunk/libavcodec/wmv2dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/wmv2dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -486,7 +486,7 @@ static av_cold int wmv2_decode_end(AVCod
 
 AVCodec wmv2_decoder = {
     "wmv2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_WMV2,
     sizeof(Wmv2Context),
     wmv2_decode_init,

Modified: trunk/libavcodec/wmv2enc.c
==============================================================================
--- trunk/libavcodec/wmv2enc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/wmv2enc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -213,7 +213,7 @@ void ff_wmv2_encode_mb(MpegEncContext * 
 
 AVCodec wmv2_encoder = {
     "wmv2",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_WMV2,
     sizeof(Wmv2Context),
     wmv2_encode_init,

Modified: trunk/libavcodec/wnv1.c
==============================================================================
--- trunk/libavcodec/wnv1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/wnv1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -156,7 +156,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec wnv1_decoder = {
     "wnv1",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_WNV1,
     sizeof(WNV1Context),
     decode_init,

Modified: trunk/libavcodec/ws-snd1.c
==============================================================================
--- trunk/libavcodec/ws-snd1.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/ws-snd1.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -147,7 +147,7 @@ static int ws_snd_decode_frame(AVCodecCo
 
 AVCodec ws_snd1_decoder = {
     "ws_snd1",
-    CODEC_TYPE_AUDIO,
+    AVMEDIA_TYPE_AUDIO,
     CODEC_ID_WESTWOOD_SND1,
     0,
     ws_snd_decode_init,

Modified: trunk/libavcodec/xan.c
==============================================================================
--- trunk/libavcodec/xan.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/xan.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -417,7 +417,7 @@ static av_cold int xan_decode_end(AVCode
 
 AVCodec xan_wc3_decoder = {
     "xan_wc3",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_XAN_WC3,
     sizeof(XanContext),
     xan_decode_init,
@@ -431,7 +431,7 @@ AVCodec xan_wc3_decoder = {
 /*
 AVCodec xan_wc4_decoder = {
     "xan_wc4",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_XAN_WC4,
     sizeof(XanContext),
     xan_decode_init,

Modified: trunk/libavcodec/xl.c
==============================================================================
--- trunk/libavcodec/xl.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/xl.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -140,7 +140,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec xl_decoder = {
     "xl",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VIXL,
     sizeof(VideoXLContext),
     decode_init,

Modified: trunk/libavcodec/xsubdec.c
==============================================================================
--- trunk/libavcodec/xsubdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/xsubdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -132,7 +132,7 @@ static int decode_frame(AVCodecContext *
 
 AVCodec xsub_decoder = {
     "xsub",
-    CODEC_TYPE_SUBTITLE,
+    AVMEDIA_TYPE_SUBTITLE,
     CODEC_ID_XSUB,
     0,
     decode_init,

Modified: trunk/libavcodec/xsubenc.c
==============================================================================
--- trunk/libavcodec/xsubenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/xsubenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -212,7 +212,7 @@ static av_cold int xsub_encoder_init(AVC
 
 AVCodec xsub_encoder = {
     "xsub",
-    CODEC_TYPE_SUBTITLE,
+    AVMEDIA_TYPE_SUBTITLE,
     CODEC_ID_XSUB,
     0,
     xsub_encoder_init,

Modified: trunk/libavcodec/yop.c
==============================================================================
--- trunk/libavcodec/yop.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/yop.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -249,7 +249,7 @@ static int yop_decode_frame(AVCodecConte
 
 AVCodec yop_decoder = {
     "yop",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_YOP,
     sizeof(YopDecContext),
     yop_decode_init,

Modified: trunk/libavcodec/zmbv.c
==============================================================================
--- trunk/libavcodec/zmbv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/zmbv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -654,7 +654,7 @@ static av_cold int decode_end(AVCodecCon
 
 AVCodec zmbv_decoder = {
     "zmbv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ZMBV,
     sizeof(ZmbvContext),
     decode_init,

Modified: trunk/libavcodec/zmbvenc.c
==============================================================================
--- trunk/libavcodec/zmbvenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavcodec/zmbvenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -325,7 +325,7 @@ static av_cold int encode_end(AVCodecCon
 
 AVCodec zmbv_encoder = {
     "zmbv",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_ZMBV,
     sizeof(ZmbvEncContext),
     encode_init,

Modified: trunk/libavdevice/alsa-audio-dec.c
==============================================================================
--- trunk/libavdevice/alsa-audio-dec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavdevice/alsa-audio-dec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -111,7 +111,7 @@ static av_cold int audio_read_header(AVF
     }
 
     /* take real parameters */
-    st->codec->codec_type  = CODEC_TYPE_AUDIO;
+    st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id    = codec_id;
     st->codec->sample_rate = sample_rate;
     st->codec->channels    = ap->channels;

Modified: trunk/libavdevice/bktr.c
==============================================================================
--- trunk/libavdevice/bktr.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavdevice/bktr.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -269,7 +269,7 @@ static int grab_read_header(AVFormatCont
     s->frame_rate_base = frame_rate_base;
     s->per_frame = ((uint64_t)1000000 * s->frame_rate_base) / s->frame_rate;
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->pix_fmt = PIX_FMT_YUV420P;
     st->codec->codec_id = CODEC_ID_RAWVIDEO;
     st->codec->width = width;

Modified: trunk/libavdevice/jack_audio.c
==============================================================================
--- trunk/libavdevice/jack_audio.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavdevice/jack_audio.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -237,7 +237,7 @@ static int audio_read_header(AVFormatCon
         return AVERROR(ENOMEM);
     }
 
-    stream->codec->codec_type   = CODEC_TYPE_AUDIO;
+    stream->codec->codec_type   = AVMEDIA_TYPE_AUDIO;
 #if HAVE_BIGENDIAN
     stream->codec->codec_id     = CODEC_ID_PCM_F32BE;
 #else

Modified: trunk/libavdevice/libdc1394.c
==============================================================================
--- trunk/libavdevice/libdc1394.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavdevice/libdc1394.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -117,7 +117,7 @@ static inline int dc1394_read_common(AVF
     if (!vst)
         goto out;
     av_set_pts_info(vst, 64, 1, 1000);
-    vst->codec->codec_type = CODEC_TYPE_VIDEO;
+    vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     vst->codec->codec_id = CODEC_ID_RAWVIDEO;
     vst->codec->time_base.den = fps->frame_rate;
     vst->codec->time_base.num = 1000;

Modified: trunk/libavdevice/oss_audio.c
==============================================================================
--- trunk/libavdevice/oss_audio.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavdevice/oss_audio.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -232,7 +232,7 @@ static int audio_read_header(AVFormatCon
     }
 
     /* take real parameters */
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = s->codec_id;
     st->codec->sample_rate = s->sample_rate;
     st->codec->channels = s->channels;

Modified: trunk/libavdevice/v4l.c
==============================================================================
--- trunk/libavdevice/v4l.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavdevice/v4l.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -242,7 +242,7 @@ static int grab_read_header(AVFormatCont
 
     s->fd = video_fd;
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_RAWVIDEO;
     st->codec->width = s->video_win.width;
     st->codec->height = s->video_win.height;

Modified: trunk/libavdevice/v4l2.c
==============================================================================
--- trunk/libavdevice/v4l2.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavdevice/v4l2.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -646,7 +646,7 @@ static int v4l2_read_header(AVFormatCont
     }
     s->top_field_first = first_field(s->fd);
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = codec_id;
     st->codec->width = width;
     st->codec->height = height;

Modified: trunk/libavdevice/vfwcap.c
==============================================================================
--- trunk/libavdevice/vfwcap.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavdevice/vfwcap.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -353,7 +353,7 @@ static int vfw_read_header(AVFormatConte
 
     codec = st->codec;
     codec->time_base = ap->time_base;
-    codec->codec_type = CODEC_TYPE_VIDEO;
+    codec->codec_type = AVMEDIA_TYPE_VIDEO;
     codec->width = width;
     codec->height = height;
     codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount);

Modified: trunk/libavdevice/x11grab.c
==============================================================================
--- trunk/libavdevice/x11grab.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavdevice/x11grab.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -226,7 +226,7 @@ x11grab_read_header(AVFormatContext *s1,
     x11grab->image = image;
     x11grab->use_shm = use_shm;
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_RAWVIDEO;
     st->codec->width = ap->width;
     st->codec->height = ap->height;

Modified: trunk/libavfilter/avfilter.h
==============================================================================
--- trunk/libavfilter/avfilter.h	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/avfilter.h	Wed Mar 31 01:30:55 2010	(r22735)
@@ -280,7 +280,7 @@ struct AVFilterPad
      * AVFilterPad type. Only video supported now, hopefully someone will
      * add audio in the future.
      */
-    enum CodecType type;
+    enum AVMediaType type;
 
     /**
      * Minimum required permissions on incoming buffers. Any buffer with

Modified: trunk/libavfilter/vf_aspect.c
==============================================================================
--- trunk/libavfilter/vf_aspect.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/vf_aspect.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -86,7 +86,7 @@ AVFilter avfilter_vf_aspect = {
     .priv_size = sizeof(AspectContext),
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO,
+                                    .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = frameaspect_config_props,
                                     .get_video_buffer = avfilter_null_get_video_buffer,
                                     .start_frame      = start_frame,
@@ -94,7 +94,7 @@ AVFilter avfilter_vf_aspect = {
                                   { .name = NULL}},
 
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO, },
+                                    .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
 };
 #endif /* CONFIG_ASPECT_FILTER */
@@ -109,14 +109,14 @@ AVFilter avfilter_vf_pixelaspect = {
     .priv_size = sizeof(AspectContext),
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO,
+                                    .type             = AVMEDIA_TYPE_VIDEO,
                                     .get_video_buffer = avfilter_null_get_video_buffer,
                                     .start_frame      = start_frame,
                                     .end_frame        = avfilter_null_end_frame },
                                   { .name = NULL}},
 
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO, },
+                                    .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
 };
 #endif /* CONFIG_PIXELASPECT_FILTER */

Modified: trunk/libavfilter/vf_crop.c
==============================================================================
--- trunk/libavfilter/vf_crop.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/vf_crop.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -214,14 +214,14 @@ AVFilter avfilter_vf_crop = {
     .init          = init,
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO,
+                                    .type             = AVMEDIA_TYPE_VIDEO,
                                     .start_frame      = start_frame,
                                     .draw_slice       = draw_slice,
                                     .get_video_buffer = avfilter_null_get_video_buffer,
                                     .config_props     = config_input, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO,
+                                    .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = config_output, },
                                   { .name = NULL}},
 };

Modified: trunk/libavfilter/vf_format.c
==============================================================================
--- trunk/libavfilter/vf_format.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/vf_format.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -103,14 +103,14 @@ AVFilter avfilter_vf_format = {
     .priv_size = sizeof(FormatContext),
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
-                                    .type            = CODEC_TYPE_VIDEO,
+                                    .type            = AVMEDIA_TYPE_VIDEO,
                                     .get_video_buffer= avfilter_null_get_video_buffer,
                                     .start_frame     = avfilter_null_start_frame,
                                     .draw_slice      = avfilter_null_draw_slice,
                                     .end_frame       = avfilter_null_end_frame, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
-                                    .type            = CODEC_TYPE_VIDEO },
+                                    .type            = AVMEDIA_TYPE_VIDEO },
                                   { .name = NULL}},
 };
 #endif /* CONFIG_FORMAT_FILTER */
@@ -133,14 +133,14 @@ AVFilter avfilter_vf_noformat = {
     .priv_size = sizeof(FormatContext),
 
     .inputs    = (AVFilterPad[]) {{ .name            = "default",
-                                    .type            = CODEC_TYPE_VIDEO,
+                                    .type            = AVMEDIA_TYPE_VIDEO,
                                     .get_video_buffer= avfilter_null_get_video_buffer,
                                     .start_frame     = avfilter_null_start_frame,
                                     .draw_slice      = avfilter_null_draw_slice,
                                     .end_frame       = avfilter_null_end_frame, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
-                                    .type            = CODEC_TYPE_VIDEO },
+                                    .type            = AVMEDIA_TYPE_VIDEO },
                                   { .name = NULL}},
 };
 #endif /* CONFIG_NOFORMAT_FILTER */

Modified: trunk/libavfilter/vf_null.c
==============================================================================
--- trunk/libavfilter/vf_null.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/vf_null.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -30,13 +30,13 @@ AVFilter avfilter_vf_null = {
     .priv_size = 0,
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO,
+                                    .type             = AVMEDIA_TYPE_VIDEO,
                                     .get_video_buffer = avfilter_null_get_video_buffer,
                                     .start_frame      = avfilter_null_start_frame,
                                     .end_frame        = avfilter_null_end_frame },
                                   { .name = NULL}},
 
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO, },
+                                    .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
 };

Modified: trunk/libavfilter/vf_scale.c
==============================================================================
--- trunk/libavfilter/vf_scale.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/vf_scale.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -197,13 +197,13 @@ AVFilter avfilter_vf_scale = {
     .priv_size = sizeof(ScaleContext),
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO,
+                                    .type             = AVMEDIA_TYPE_VIDEO,
                                     .start_frame      = start_frame,
                                     .draw_slice       = draw_slice,
                                     .min_perms        = AV_PERM_READ, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO,
+                                    .type             = AVMEDIA_TYPE_VIDEO,
                                     .config_props     = config_props, },
                                   { .name = NULL}},
 };

Modified: trunk/libavfilter/vf_slicify.c
==============================================================================
--- trunk/libavfilter/vf_slicify.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/vf_slicify.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -104,7 +104,7 @@ AVFilter avfilter_vf_slicify = {
     .priv_size = sizeof(SliceContext),
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO,
+                                    .type             = AVMEDIA_TYPE_VIDEO,
                                     .get_video_buffer = avfilter_null_get_video_buffer,
                                     .start_frame      = start_frame,
                                     .draw_slice       = draw_slice,
@@ -112,6 +112,6 @@ AVFilter avfilter_vf_slicify = {
                                     .end_frame        = avfilter_null_end_frame, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name            = "default",
-                                    .type            = CODEC_TYPE_VIDEO, },
+                                    .type            = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
 };

Modified: trunk/libavfilter/vf_vflip.c
==============================================================================
--- trunk/libavfilter/vf_vflip.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/vf_vflip.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -91,7 +91,7 @@ AVFilter avfilter_vf_vflip = {
     .priv_size = sizeof(FlipContext),
 
     .inputs    = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO,
+                                    .type             = AVMEDIA_TYPE_VIDEO,
                                     .get_video_buffer = get_video_buffer,
                                     .start_frame      = start_frame,
                                     .draw_slice       = draw_slice,
@@ -99,6 +99,6 @@ AVFilter avfilter_vf_vflip = {
                                     .config_props     = config_input, },
                                   { .name = NULL}},
     .outputs   = (AVFilterPad[]) {{ .name             = "default",
-                                    .type             = CODEC_TYPE_VIDEO, },
+                                    .type             = AVMEDIA_TYPE_VIDEO, },
                                   { .name = NULL}},
 };

Modified: trunk/libavfilter/vsink_nullsink.c
==============================================================================
--- trunk/libavfilter/vsink_nullsink.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/vsink_nullsink.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -35,7 +35,7 @@ AVFilter avfilter_vsink_nullsink = {
     .inputs    = (AVFilterPad[]) {
         {
             .name            = "default",
-            .type            = CODEC_TYPE_VIDEO,
+            .type            = AVMEDIA_TYPE_VIDEO,
             .start_frame     = start_frame,
             .end_frame       = end_frame,
         },

Modified: trunk/libavfilter/vsrc_nullsrc.c
==============================================================================
--- trunk/libavfilter/vsrc_nullsrc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavfilter/vsrc_nullsrc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -74,7 +74,7 @@ AVFilter avfilter_vsrc_nullsrc = {
     .outputs   = (AVFilterPad[]) {
         {
             .name            = "default",
-            .type            = CODEC_TYPE_VIDEO,
+            .type            = AVMEDIA_TYPE_VIDEO,
             .config_props    = config_props,
             .request_frame   = request_frame,
         },

Modified: trunk/libavformat/4xm.c
==============================================================================
--- trunk/libavformat/4xm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/4xm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -149,7 +149,7 @@ static int fourxm_read_header(AVFormatCo
 
             fourxm->video_stream_index = st->index;
 
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_id = CODEC_ID_4XM;
             st->codec->extradata_size = 4;
             st->codec->extradata = av_malloc(4);
@@ -198,7 +198,7 @@ static int fourxm_read_header(AVFormatCo
 
             fourxm->tracks[current_track].stream_index = st->index;
 
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             st->codec->codec_tag = 0;
             st->codec->channels              = fourxm->tracks[current_track].channels;
             st->codec->sample_rate           = fourxm->tracks[current_track].sample_rate;

Modified: trunk/libavformat/aea.c
==============================================================================
--- trunk/libavformat/aea.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/aea.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -71,7 +71,7 @@ static int aea_read_header(AVFormatConte
     url_fskip(s->pb, 1783);
 
 
-    st->codec->codec_type     = CODEC_TYPE_AUDIO;
+    st->codec->codec_type     = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id       = CODEC_ID_ATRAC1;
     st->codec->sample_rate    = 44100;
     st->codec->bit_rate       = 292000;

Modified: trunk/libavformat/aiffdec.c
==============================================================================
--- trunk/libavformat/aiffdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/aiffdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -92,7 +92,7 @@ static unsigned int get_aiff_header(Byte
 
     if (size & 1)
         size++;
-    codec->codec_type = CODEC_TYPE_AUDIO;
+    codec->codec_type = AVMEDIA_TYPE_AUDIO;
     codec->channels = get_be16(pb);
     num_frames = get_be32(pb);
     codec->bits_per_coded_sample = get_be16(pb);

Modified: trunk/libavformat/amr.c
==============================================================================
--- trunk/libavformat/amr.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/amr.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -108,7 +108,7 @@ static int amr_read_header(AVFormatConte
         st->codec->sample_rate = 8000;
     }
     st->codec->channels = 1;
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     av_set_pts_info(st, 64, 1, st->codec->sample_rate);
 
     return 0;

Modified: trunk/libavformat/anm.c
==============================================================================
--- trunk/libavformat/anm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/anm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -100,7 +100,7 @@ static int read_header(AVFormatContext *
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_ANM;
     st->codec->codec_tag  = 0; /* no fourcc */
     st->codec->width      = get_le16(pb);

Modified: trunk/libavformat/apc.c
==============================================================================
--- trunk/libavformat/apc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/apc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -43,7 +43,7 @@ static int apc_read_header(AVFormatConte
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;
 
     get_le32(pb); /* number of samples */

Modified: trunk/libavformat/ape.c
==============================================================================
--- trunk/libavformat/ape.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/ape.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -301,7 +301,7 @@ static int ape_read_header(AVFormatConte
 
     total_blocks = (ape->totalframes == 0) ? 0 : ((ape->totalframes - 1) * ape->blocksperframe) + ape->finalframeblocks;
 
-    st->codec->codec_type      = CODEC_TYPE_AUDIO;
+    st->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id        = CODEC_ID_APE;
     st->codec->codec_tag       = MKTAG('A', 'P', 'E', ' ');
     st->codec->channels        = ape->channels;

Modified: trunk/libavformat/asfdec.c
==============================================================================
--- trunk/libavformat/asfdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/asfdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -236,7 +236,7 @@ static int asf_read_header(AVFormatConte
             asf->hdr.max_bitrate        = get_le32(pb);
             s->packet_size = asf->hdr.max_pktsize;
         } else if (!guidcmp(&g, &ff_asf_stream_header)) {
-            enum CodecType type;
+            enum AVMediaType type;
             int type_specific_size, sizeX;
             uint64_t total_size;
             unsigned int tag1;
@@ -265,14 +265,14 @@ static int asf_read_header(AVFormatConte
 
             test_for_ext_stream_audio = 0;
             if (!guidcmp(&g, &ff_asf_audio_stream)) {
-                type = CODEC_TYPE_AUDIO;
+                type = AVMEDIA_TYPE_AUDIO;
             } else if (!guidcmp(&g, &ff_asf_video_stream)) {
-                type = CODEC_TYPE_VIDEO;
+                type = AVMEDIA_TYPE_VIDEO;
             } else if (!guidcmp(&g, &ff_asf_command_stream)) {
-                type = CODEC_TYPE_DATA;
+                type = AVMEDIA_TYPE_DATA;
             } else if (!guidcmp(&g, &ff_asf_ext_stream_embed_stream_header)) {
                 test_for_ext_stream_audio = 1;
-                type = CODEC_TYPE_UNKNOWN;
+                type = AVMEDIA_TYPE_UNKNOWN;
             } else {
                 return -1;
             }
@@ -289,7 +289,7 @@ static int asf_read_header(AVFormatConte
             if (test_for_ext_stream_audio) {
                 get_guid(pb, &g);
                 if (!guidcmp(&g, &ff_asf_ext_stream_audio_stream)) {
-                    type = CODEC_TYPE_AUDIO;
+                    type = AVMEDIA_TYPE_AUDIO;
                     is_dvr_ms_audio=1;
                     get_guid(pb, &g);
                     get_le32(pb);
@@ -301,7 +301,7 @@ static int asf_read_header(AVFormatConte
             }
 
             st->codec->codec_type = type;
-            if (type == CODEC_TYPE_AUDIO) {
+            if (type == AVMEDIA_TYPE_AUDIO) {
                 ff_get_wav_header(pb, st->codec, type_specific_size);
                 if (is_dvr_ms_audio) {
                     // codec_id and codec_tag are unreliable in dvr_ms
@@ -351,7 +351,7 @@ static int asf_read_header(AVFormatConte
                     st->codec->frame_size = 1;
                     break;
                 }
-            } else if (type == CODEC_TYPE_VIDEO) {
+            } else if (type == AVMEDIA_TYPE_VIDEO) {
                 get_le32(pb);
                 get_le32(pb);
                 get_byte(pb);
@@ -889,8 +889,8 @@ static int ff_asf_parse_packet(AVFormatC
             asf_st->packet_pos= asf->packet_pos;
 //printf("new packet: stream:%d key:%d packet_key:%d audio:%d size:%d\n",
 //asf->stream_index, asf->packet_key_frame, asf_st->pkt.flags & PKT_FLAG_KEY,
-//s->streams[asf->stream_index]->codec->codec_type == CODEC_TYPE_AUDIO, asf->packet_obj_size);
-            if (s->streams[asf->stream_index]->codec->codec_type == CODEC_TYPE_AUDIO)
+//s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO, asf->packet_obj_size);
+            if (s->streams[asf->stream_index]->codec->codec_type == AVMEDIA_TYPE_AUDIO)
                 asf->packet_key_frame = 1;
             if (asf->packet_key_frame)
                 asf_st->pkt.flags |= PKT_FLAG_KEY;

Modified: trunk/libavformat/asfenc.c
==============================================================================
--- trunk/libavformat/asfenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/asfenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -375,13 +375,13 @@ static int asf_write_header1(AVFormatCon
 
 
         switch(enc->codec_type) {
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             wav_extra_size = 0;
             extra_size = 18 + wav_extra_size;
             extra_size2 = 8;
             break;
         default:
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             wav_extra_size = enc->extradata_size;
             extra_size = 0x33 + wav_extra_size;
             extra_size2 = 0;
@@ -389,7 +389,7 @@ static int asf_write_header1(AVFormatCon
         }
 
         hpos = put_header(pb, &ff_asf_stream_header);
-        if (enc->codec_type == CODEC_TYPE_AUDIO) {
+        if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
             put_guid(pb, &ff_asf_audio_stream);
             put_guid(pb, &ff_asf_audio_conceal_spread);
         } else {
@@ -403,7 +403,7 @@ static int asf_write_header1(AVFormatCon
         put_le16(pb, n + 1); /* stream number */
         put_le32(pb, 0); /* ??? */
 
-        if (enc->codec_type == CODEC_TYPE_AUDIO) {
+        if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
             /* WAVEFORMATEX header */
             int wavsize = ff_put_wav_header(pb, enc);
             if ((enc->codec_id != CODEC_ID_MP3) && (enc->codec_id != CODEC_ID_MP2) && (enc->codec_id != CODEC_ID_ADPCM_IMA_WAV) && (enc->extradata_size==0)) {
@@ -457,9 +457,9 @@ static int asf_write_header1(AVFormatCon
         enc = s->streams[n]->codec;
         p = avcodec_find_encoder(enc->codec_id);
 
-        if(enc->codec_type == CODEC_TYPE_AUDIO)
+        if(enc->codec_type == AVMEDIA_TYPE_AUDIO)
             put_le16(pb, 2);
-        else if(enc->codec_type == CODEC_TYPE_VIDEO)
+        else if(enc->codec_type == AVMEDIA_TYPE_VIDEO)
             put_le16(pb, 1);
         else
             put_le16(pb, -1);
@@ -483,7 +483,7 @@ static int asf_write_header1(AVFormatCon
 
 
         /* id */
-        if (enc->codec_type == CODEC_TYPE_AUDIO) {
+        if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
             put_le16(pb, 2);
             put_le16(pb, enc->codec_tag);
         } else {
@@ -722,7 +722,7 @@ static void put_frame(
             // multi payloads
             frag_len1 = asf->packet_size_left - PAYLOAD_HEADER_SIZE_MULTIPLE_PAYLOADS - PACKET_HEADER_MIN_SIZE - 1;
 
-            if(frag_len1 < payload_len && avst->codec->codec_type == CODEC_TYPE_AUDIO){
+            if(frag_len1 < payload_len && avst->codec->codec_type == AVMEDIA_TYPE_AUDIO){
                 flush_packet(s);
                 continue;
             }
@@ -770,7 +770,7 @@ static int asf_write_packet(AVFormatCont
     codec = s->streams[pkt->stream_index]->codec;
     stream = &asf->streams[pkt->stream_index];
 
-    if(codec->codec_type == CODEC_TYPE_AUDIO)
+    if(codec->codec_type == AVMEDIA_TYPE_AUDIO)
         flags &= ~PKT_FLAG_KEY;
 
     pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;

Modified: trunk/libavformat/assdec.c
==============================================================================
--- trunk/libavformat/assdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/assdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -99,7 +99,7 @@ static int read_header(AVFormatContext *
     if (!st)
         return -1;
     av_set_pts_info(st, 64, 1, 100);
-    st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+    st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
     st->codec->codec_id= CODEC_ID_SSA;
 
     header_remaining= INT_MAX;

Modified: trunk/libavformat/au.c
==============================================================================
--- trunk/libavformat/au.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/au.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -148,7 +148,7 @@ static int au_read_header(AVFormatContex
     st = av_new_stream(s, 0);
     if (!st)
         return -1;
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_tag = id;
     st->codec->codec_id = codec;
     st->codec->channels = channels;

Modified: trunk/libavformat/audiointerleave.c
==============================================================================
--- trunk/libavformat/audiointerleave.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/audiointerleave.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -32,7 +32,7 @@ void ff_audio_interleave_close(AVFormatC
         AVStream *st = s->streams[i];
         AudioInterleaveContext *aic = st->priv_data;
 
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO)
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
             av_fifo_free(aic->fifo);
     }
 }
@@ -50,7 +50,7 @@ int ff_audio_interleave_init(AVFormatCon
         AVStream *st = s->streams[i];
         AudioInterleaveContext *aic = st->priv_data;
 
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             aic->sample_size = (st->codec->channels *
                                 av_get_bits_per_sample(st->codec->codec_id)) / 8;
             if (!aic->sample_size) {
@@ -103,7 +103,7 @@ int ff_audio_rechunk_interleave(AVFormat
     if (pkt) {
         AVStream *st = s->streams[pkt->stream_index];
         AudioInterleaveContext *aic = st->priv_data;
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             unsigned new_size = av_fifo_size(aic->fifo) + pkt->size;
             if (new_size > aic->fifo_size) {
                 if (av_fifo_realloc2(aic->fifo, new_size) < 0)
@@ -122,7 +122,7 @@ int ff_audio_rechunk_interleave(AVFormat
 
     for (i = 0; i < s->nb_streams; i++) {
         AVStream *st = s->streams[i];
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             AVPacket new_pkt;
             while (ff_interleave_new_audio_packet(s, &new_pkt, i, flush))
                 ff_interleave_add_packet(s, &new_pkt, compare_ts);

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/avformat.h	Wed Mar 31 01:30:55 2010	(r22735)
@@ -804,7 +804,7 @@ AVOutputFormat *av_guess_format(const ch
  */
 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
                             const char *filename, const char *mime_type,
-                            enum CodecType type);
+                            enum AVMediaType type);
 
 /**
  * Sends a nice hexadecimal dump of a buffer to the specified file stream.

Modified: trunk/libavformat/avidec.c
==============================================================================
--- trunk/libavformat/avidec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/avidec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -442,19 +442,19 @@ static int avi_read_header(AVFormatConte
 
             switch(tag1) {
             case MKTAG('v', 'i', 'd', 's'):
-                codec_type = CODEC_TYPE_VIDEO;
+                codec_type = AVMEDIA_TYPE_VIDEO;
 
                 ast->sample_size = 0;
                 break;
             case MKTAG('a', 'u', 'd', 's'):
-                codec_type = CODEC_TYPE_AUDIO;
+                codec_type = AVMEDIA_TYPE_AUDIO;
                 break;
             case MKTAG('t', 'x', 't', 's'):
                 //FIXME
-                codec_type = CODEC_TYPE_DATA; //CODEC_TYPE_SUB ?  FIXME
+                codec_type = AVMEDIA_TYPE_DATA; //AVMEDIA_TYPE_SUB ?  FIXME
                 break;
             case MKTAG('d', 'a', 't', 's'):
-                codec_type = CODEC_TYPE_DATA;
+                codec_type = AVMEDIA_TYPE_DATA;
                 break;
             default:
                 av_log(s, AV_LOG_ERROR, "unknown stream type %X\n", tag1);
@@ -475,11 +475,11 @@ static int avi_read_header(AVFormatConte
                     size = FFMIN(size, list_end - cur_pos);
                 st = s->streams[stream_index];
                 switch(codec_type) {
-                case CODEC_TYPE_VIDEO:
+                case AVMEDIA_TYPE_VIDEO:
                     if(amv_file_format){
                         st->codec->width=avih_width;
                         st->codec->height=avih_height;
-                        st->codec->codec_type = CODEC_TYPE_VIDEO;
+                        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                         st->codec->codec_id = CODEC_ID_AMV;
                         url_fskip(pb, size);
                         break;
@@ -497,7 +497,7 @@ static int avi_read_header(AVFormatConte
                     get_le32(pb); /* ClrImportant */
 
                     if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) {
-                        st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+                        st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
                         st->codec->codec_tag = tag1;
                         st->codec->codec_id = CODEC_ID_XSUB;
                         break;
@@ -534,7 +534,7 @@ static int avi_read_header(AVFormatConte
 #ifdef DEBUG
                     print_tag("video", tag1, 0);
 #endif
-                    st->codec->codec_type = CODEC_TYPE_VIDEO;
+                    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                     st->codec->codec_tag = tag1;
                     st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag1);
                     st->need_parsing = AVSTREAM_PARSE_HEADERS; // This is needed to get the pict type which is necessary for generating correct pts.
@@ -554,7 +554,7 @@ static int avi_read_header(AVFormatConte
 
 //                    url_fskip(pb, size - 5 * 4);
                     break;
-                case CODEC_TYPE_AUDIO:
+                case AVMEDIA_TYPE_AUDIO:
                     ff_get_wav_header(pb, st->codec, size);
                     if(ast->sample_size && st->codec->block_align && ast->sample_size != st->codec->block_align){
                         av_log(s, AV_LOG_WARNING, "sample size (%d) != block align (%d)\n", ast->sample_size, st->codec->block_align);
@@ -580,7 +580,7 @@ static int avi_read_header(AVFormatConte
                         st->codec->codec_id  = CODEC_ID_ADPCM_IMA_AMV;
                     break;
                 default:
-                    st->codec->codec_type = CODEC_TYPE_DATA;
+                    st->codec->codec_type = AVMEDIA_TYPE_DATA;
                     st->codec->codec_id= CODEC_ID_NONE;
                     st->codec->codec_tag= 0;
                     url_fskip(pb, size);
@@ -787,7 +787,7 @@ resync:
 //av_log(s, AV_LOG_DEBUG, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size);
             pkt->stream_index = avi->stream_index;
 
-            if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+            if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
                 AVIndexEntry *e;
                 int index;
                 assert(st->index_entries);
@@ -871,8 +871,8 @@ resync:
                 //workaround for broken small-file-bug402.avi
                 if(   d[2] == 'w' && d[3] == 'b'
                    && n==0
-                   && st ->codec->codec_type == CODEC_TYPE_VIDEO
-                   && st1->codec->codec_type == CODEC_TYPE_AUDIO
+                   && st ->codec->codec_type == AVMEDIA_TYPE_VIDEO
+                   && st1->codec->codec_type == AVMEDIA_TYPE_AUDIO
                    && ast->prefix == 'd'*256+'c'
                    && (d[2]*256+d[3] == ast1->prefix || !ast1->prefix_count)
                   ){

Modified: trunk/libavformat/avienc.c
==============================================================================
--- trunk/libavformat/avienc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/avienc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -83,14 +83,14 @@ static int64_t avi_start_new_riff(AVForm
     return loff;
 }
 
-static char* avi_stream2fourcc(char* tag, int index, enum CodecType type)
+static char* avi_stream2fourcc(char* tag, int index, enum AVMediaType type)
 {
     tag[0] = '0';
     tag[1] = '0' + index;
-    if (type == CODEC_TYPE_VIDEO) {
+    if (type == AVMEDIA_TYPE_VIDEO) {
         tag[2] = 'd';
         tag[3] = 'c';
-    } else if (type == CODEC_TYPE_SUBTITLE) {
+    } else if (type == AVMEDIA_TYPE_SUBTITLE) {
         // note: this is not an official code
         tag[2] = 's';
         tag[3] = 'b';
@@ -136,7 +136,7 @@ static int avi_write_counters(AVFormatCo
         } else {
             put_le32(pb, avist->audio_strm_length / au_ssize);
         }
-        if(stream->codec_type == CODEC_TYPE_VIDEO)
+        if(stream->codec_type == AVMEDIA_TYPE_VIDEO)
             nb_frames = FFMAX(nb_frames, avist->packet_count);
     }
     if(riff_id == 1) {
@@ -177,7 +177,7 @@ static int avi_write_header(AVFormatCont
     for(n=0;n<s->nb_streams;n++) {
         stream = s->streams[n]->codec;
         bitrate += stream->bit_rate;
-        if (stream->codec_type == CODEC_TYPE_VIDEO)
+        if (stream->codec_type == AVMEDIA_TYPE_VIDEO)
             video_enc = stream;
     }
 
@@ -222,16 +222,16 @@ static int avi_write_header(AVFormatCont
         /* stream generic header */
         strh = ff_start_tag(pb, "strh");
         switch(stream->codec_type) {
-        case CODEC_TYPE_SUBTITLE:
+        case AVMEDIA_TYPE_SUBTITLE:
             // XSUB subtitles behave like video tracks, other subtitles
             // are not (yet) supported.
             if (stream->codec_id != CODEC_ID_XSUB) break;
-        case CODEC_TYPE_VIDEO: put_tag(pb, "vids"); break;
-        case CODEC_TYPE_AUDIO: put_tag(pb, "auds"); break;
-//        case CODEC_TYPE_TEXT : put_tag(pb, "txts"); break;
-        case CODEC_TYPE_DATA : put_tag(pb, "dats"); break;
+        case AVMEDIA_TYPE_VIDEO: put_tag(pb, "vids"); break;
+        case AVMEDIA_TYPE_AUDIO: put_tag(pb, "auds"); break;
+//        case AVMEDIA_TYPE_TEXT : put_tag(pb, "txts"); break;
+        case AVMEDIA_TYPE_DATA : put_tag(pb, "dats"); break;
         }
-        if(stream->codec_type == CODEC_TYPE_VIDEO ||
+        if(stream->codec_type == AVMEDIA_TYPE_VIDEO ||
            stream->codec_id == CODEC_ID_XSUB)
             put_le32(pb, stream->codec_tag);
         else
@@ -255,9 +255,9 @@ static int avi_write_header(AVFormatCont
             put_le32(pb, 0); /* length, XXX: filled later */
 
         /* suggested buffer size */ //FIXME set at the end to largest chunk
-        if(stream->codec_type == CODEC_TYPE_VIDEO)
+        if(stream->codec_type == AVMEDIA_TYPE_VIDEO)
             put_le32(pb, 1024 * 1024);
-        else if(stream->codec_type == CODEC_TYPE_AUDIO)
+        else if(stream->codec_type == AVMEDIA_TYPE_AUDIO)
             put_le32(pb, 12 * 1024);
         else
             put_le32(pb, 0);
@@ -268,17 +268,17 @@ static int avi_write_header(AVFormatCont
         put_le16(pb, stream->height);
         ff_end_tag(pb, strh);
 
-      if(stream->codec_type != CODEC_TYPE_DATA){
+      if(stream->codec_type != AVMEDIA_TYPE_DATA){
         strf = ff_start_tag(pb, "strf");
         switch(stream->codec_type) {
-        case CODEC_TYPE_SUBTITLE:
+        case AVMEDIA_TYPE_SUBTITLE:
             // XSUB subtitles behave like video tracks, other subtitles
             // are not (yet) supported.
             if (stream->codec_id != CODEC_ID_XSUB) break;
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0);
             break;
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             if (ff_put_wav_header(pb, stream) < 0) {
                 return -1;
             }
@@ -322,7 +322,7 @@ static int avi_write_header(AVFormatCont
             ff_end_tag(pb, avist->indexes.indx_start);
         }
 
-        if(   stream->codec_type == CODEC_TYPE_VIDEO
+        if(   stream->codec_type == AVMEDIA_TYPE_VIDEO
            && s->streams[i]->sample_aspect_ratio.num>0
            && s->streams[i]->sample_aspect_ratio.den>0){
             int vprp= ff_start_tag(pb, "vprp");
@@ -542,7 +542,7 @@ static int avi_write_packet(AVFormatCont
     avi_stream2fourcc(&tag[0], stream_index, enc->codec_type);
     if(pkt->flags&PKT_FLAG_KEY)
         flags = 0x10;
-    if (enc->codec_type == CODEC_TYPE_AUDIO) {
+    if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
        avist->audio_strm_length += size;
     }
 
@@ -603,7 +603,7 @@ static int avi_write_trailer(AVFormatCon
                 AVCodecContext *stream = s->streams[n]->codec;
                 AVIStream *avist= s->streams[n]->priv_data;
 
-                if (stream->codec_type == CODEC_TYPE_VIDEO) {
+                if (stream->codec_type == AVMEDIA_TYPE_VIDEO) {
                     if (nb_frames < avist->packet_count)
                         nb_frames = avist->packet_count;
                 } else {

Modified: trunk/libavformat/avisynth.c
==============================================================================
--- trunk/libavformat/avisynth.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/avisynth.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -85,7 +85,7 @@ static int avisynth_read_header(AVFormat
                     continue;
 
                   st = av_new_stream(s, id);
-                  st->codec->codec_type = CODEC_TYPE_AUDIO;
+                  st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
 
                   st->codec->block_align = wvfmt.nBlockAlign;
                   st->codec->channels = wvfmt.nChannels;
@@ -111,7 +111,7 @@ static int avisynth_read_header(AVFormat
                     continue;
 
                   st = av_new_stream(s, id);
-                  st->codec->codec_type = CODEC_TYPE_VIDEO;
+                  st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                   st->r_frame_rate.num = stream->info.dwRate;
                   st->r_frame_rate.den = stream->info.dwScale;
 

Modified: trunk/libavformat/avs.c
==============================================================================
--- trunk/libavformat/avs.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/avs.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -178,7 +178,7 @@ static int avs_read_packet(AVFormatConte
                     avs->st_video = av_new_stream(s, AVS_VIDEO);
                     if (avs->st_video == NULL)
                         return AVERROR(ENOMEM);
-                    avs->st_video->codec->codec_type = CODEC_TYPE_VIDEO;
+                    avs->st_video->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                     avs->st_video->codec->codec_id = CODEC_ID_AVS;
                     avs->st_video->codec->width = avs->width;
                     avs->st_video->codec->height = avs->height;
@@ -195,7 +195,7 @@ static int avs_read_packet(AVFormatConte
                     avs->st_audio = av_new_stream(s, AVS_AUDIO);
                     if (avs->st_audio == NULL)
                         return AVERROR(ENOMEM);
-                    avs->st_audio->codec->codec_type = CODEC_TYPE_AUDIO;
+                    avs->st_audio->codec->codec_type = AVMEDIA_TYPE_AUDIO;
                 }
                 avs->remaining_audio_size = size - 4;
                 size = avs_read_audio_packet(s, pkt);

Modified: trunk/libavformat/bethsoftvid.c
==============================================================================
--- trunk/libavformat/bethsoftvid.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/bethsoftvid.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -74,7 +74,7 @@ static int vid_read_header(AVFormatConte
     if (!stream)
         return AVERROR(ENOMEM);
     av_set_pts_info(stream, 32, 1, 60);     // 16 ms increments, i.e. 60 fps
-    stream->codec->codec_type = CODEC_TYPE_VIDEO;
+    stream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     stream->codec->codec_id = CODEC_ID_BETHSOFTVID;
     stream->codec->width = get_le16(pb);
     stream->codec->height = get_le16(pb);
@@ -86,7 +86,7 @@ static int vid_read_header(AVFormatConte
     stream = av_new_stream(s, 0);
     if (!stream)
         return AVERROR(ENOMEM);
-    stream->codec->codec_type = CODEC_TYPE_AUDIO;
+    stream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     stream->codec->codec_id = CODEC_ID_PCM_U8;
     stream->codec->channels = 1;
     stream->codec->sample_rate = 11025;

Modified: trunk/libavformat/bfi.c
==============================================================================
--- trunk/libavformat/bfi.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/bfi.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -87,12 +87,12 @@ static int bfi_read_header(AVFormatConte
 
     /* Set up the video codec... */
     av_set_pts_info(vstream, 32, 1, fps);
-    vstream->codec->codec_type = CODEC_TYPE_VIDEO;
+    vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     vstream->codec->codec_id   = CODEC_ID_BFI;
     vstream->codec->pix_fmt    = PIX_FMT_PAL8;
 
     /* Set up the audio codec now... */
-    astream->codec->codec_type      = CODEC_TYPE_AUDIO;
+    astream->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
     astream->codec->codec_id        = CODEC_ID_PCM_U8;
     astream->codec->channels        = 1;
     astream->codec->bits_per_coded_sample = 8;

Modified: trunk/libavformat/bink.c
==============================================================================
--- trunk/libavformat/bink.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/bink.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -111,7 +111,7 @@ static int read_header(AVFormatContext *
     }
     av_set_pts_info(vst, 64, fps_den, fps_num);
 
-    vst->codec->codec_type = CODEC_TYPE_VIDEO;
+    vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     vst->codec->codec_id   = CODEC_ID_BINKVIDEO;
     vst->codec->extradata  = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
     vst->codec->extradata_size = 4;
@@ -133,7 +133,7 @@ static int read_header(AVFormatContext *
             ast = av_new_stream(s, 1);
             if (!ast)
                 return AVERROR(ENOMEM);
-            ast->codec->codec_type  = CODEC_TYPE_AUDIO;
+            ast->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
             ast->codec->codec_tag   = 0;
             ast->codec->sample_rate = get_le16(pb);
             av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);

Modified: trunk/libavformat/c93.c
==============================================================================
--- trunk/libavformat/c93.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/c93.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -83,7 +83,7 @@ static int read_header(AVFormatContext *
     if (!video)
         return AVERROR(ENOMEM);
 
-    video->codec->codec_type = CODEC_TYPE_VIDEO;
+    video->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     video->codec->codec_id = CODEC_ID_C93;
     video->codec->width = 320;
     video->codec->height = 192;
@@ -120,7 +120,7 @@ static int read_packet(AVFormatContext *
                 c93->audio = av_new_stream(s, 1);
                 if (!c93->audio)
                     return AVERROR(ENOMEM);
-                c93->audio->codec->codec_type = CODEC_TYPE_AUDIO;
+                c93->audio->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             }
             url_fskip(pb, 26); /* VOC header */
             ret = voc_get_packet(s, pkt, c93->audio, datasize - 26);

Modified: trunk/libavformat/cafdec.c
==============================================================================
--- trunk/libavformat/cafdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/cafdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -64,7 +64,7 @@ static int read_desc_chunk(AVFormatConte
         return AVERROR_NOMEM;
 
     /* parse format description */
-    st->codec->codec_type  = CODEC_TYPE_AUDIO;
+    st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
     st->codec->sample_rate = av_int2dbl(get_be64(pb));
     st->codec->codec_tag   = get_be32(pb);
     flags = get_be32(pb);

Modified: trunk/libavformat/cdg.c
==============================================================================
--- trunk/libavformat/cdg.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/cdg.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -32,7 +32,7 @@ static int read_header(AVFormatContext *
     if (!vst)
         return AVERROR(ENOMEM);
 
-    vst->codec->codec_type = CODEC_TYPE_VIDEO;
+    vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     vst->codec->codec_id   = CODEC_ID_CDGRAPHICS;
 
     /// 75 sectors/sec * 4 packets/sector = 300 packets/sec

Modified: trunk/libavformat/daud.c
==============================================================================
--- trunk/libavformat/daud.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/daud.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -24,7 +24,7 @@ static int daud_header(AVFormatContext *
     AVStream *st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_PCM_S24DAUD;
     st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');
     st->codec->channels = 6;

Modified: trunk/libavformat/dsicin.c
==============================================================================
--- trunk/libavformat/dsicin.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/dsicin.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -113,7 +113,7 @@ static int cin_read_header(AVFormatConte
 
     av_set_pts_info(st, 32, 1, 12);
     cin->video_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_DSICINVIDEO;
     st->codec->codec_tag = 0;  /* no fourcc */
     st->codec->width = hdr->video_frame_width;
@@ -126,7 +126,7 @@ static int cin_read_header(AVFormatConte
 
     av_set_pts_info(st, 32, 1, 22050);
     cin->audio_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_DSICINAUDIO;
     st->codec->codec_tag = 0;  /* no tag */
     st->codec->channels = 1;

Modified: trunk/libavformat/dv.c
==============================================================================
--- trunk/libavformat/dv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/dv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -214,7 +214,7 @@ static int dv_extract_audio_info(DVDemux
            if (!c->ast[i])
                break;
            av_set_pts_info(c->ast[i], 64, 1, 30000);
-           c->ast[i]->codec->codec_type = CODEC_TYPE_AUDIO;
+           c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
            c->ast[i]->codec->codec_id   = CODEC_ID_PCM_S16LE;
 
            av_init_packet(&c->audio_pkt[i]);
@@ -290,7 +290,7 @@ DVDemuxContext* dv_init_demux(AVFormatCo
     c->frames = 0;
     c->abytes = 0;
 
-    c->vst->codec->codec_type = CODEC_TYPE_VIDEO;
+    c->vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     c->vst->codec->codec_id   = CODEC_ID_DVVIDEO;
     c->vst->codec->bit_rate   = 25000000;
     c->vst->start_time        = 0;

Modified: trunk/libavformat/dvenc.c
==============================================================================
--- trunk/libavformat/dvenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/dvenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -239,7 +239,7 @@ int dv_assemble_frame(DVMuxContext *c, A
     reqasize = 4 * dv_audio_frame_size(c->sys, c->frames);
 
     switch (st->codec->codec_type) {
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         /* FIXME: we have to have more sensible approach than this one */
         if (c->has_video)
             av_log(st->codec, AV_LOG_ERROR, "Can't process DV frame #%d. Insufficient audio data or severe sync problem.\n", c->frames);
@@ -247,7 +247,7 @@ int dv_assemble_frame(DVMuxContext *c, A
         memcpy(*frame, data, c->sys->frame_size);
         c->has_video = 1;
         break;
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         for (i = 0; i < c->n_ast && st != c->ast[i]; i++);
 
           /* FIXME: we have to have more sensible approach than this one */
@@ -299,11 +299,11 @@ DVMuxContext* dv_init_mux(AVFormatContex
     /* We have to sort out where audio and where video stream is */
     for (i=0; i<s->nb_streams; i++) {
         switch (s->streams[i]->codec->codec_type) {
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             if (vst) return NULL;
             vst = s->streams[i];
             break;
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             if (c->n_ast > 1) return NULL;
             c->ast[c->n_ast++] = s->streams[i];
             break;

Modified: trunk/libavformat/dxa.c
==============================================================================
--- trunk/libavformat/dxa.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/dxa.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -119,7 +119,7 @@ static int dxa_read_header(AVFormatConte
     }
 
     /* now we are ready: build format streams */
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_DXA;
     st->codec->width      = w;
     st->codec->height     = h;

Modified: trunk/libavformat/eacdata.c
==============================================================================
--- trunk/libavformat/eacdata.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/eacdata.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -67,7 +67,7 @@ static int cdata_read_header(AVFormatCon
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_tag = 0; /* no fourcc */
     st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS;
     st->codec->channels = cdata->channels;

Modified: trunk/libavformat/electronicarts.c
==============================================================================
--- trunk/libavformat/electronicarts.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/electronicarts.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -414,7 +414,7 @@ static int ea_read_header(AVFormatContex
         if (!st)
             return AVERROR(ENOMEM);
         ea->video_stream_index = st->index;
-        st->codec->codec_type = CODEC_TYPE_VIDEO;
+        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         st->codec->codec_id = ea->video_codec;
         st->codec->codec_tag = 0;  /* no fourcc */
         st->codec->time_base = ea->time_base;
@@ -428,7 +428,7 @@ static int ea_read_header(AVFormatContex
         if (!st)
             return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, ea->sample_rate);
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = ea->audio_codec;
         st->codec->codec_tag = 0;  /* no tag */
         st->codec->channels = ea->num_channels;

Modified: trunk/libavformat/ffmdec.c
==============================================================================
--- trunk/libavformat/ffmdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/ffmdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -301,7 +301,7 @@ static int ffm_read_header(AVFormatConte
         codec->debug = get_be32(pb);
         /* specific info */
         switch(codec->codec_type) {
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             codec->time_base.num = get_be32(pb);
             codec->time_base.den = get_be32(pb);
             codec->width = get_be16(pb);
@@ -350,7 +350,7 @@ static int ffm_read_header(AVFormatConte
             codec->refs = get_be32(pb);
             codec->directpred = get_be32(pb);
             break;
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             codec->sample_rate = get_be32(pb);
             codec->channels = get_le16(pb);
             codec->frame_size = get_le16(pb);

Modified: trunk/libavformat/ffmenc.c
==============================================================================
--- trunk/libavformat/ffmenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/ffmenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -119,7 +119,7 @@ static int ffm_write_header(AVFormatCont
         put_be32(pb, codec->debug);
         /* specific info */
         switch(codec->codec_type) {
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             put_be32(pb, codec->time_base.num);
             put_be32(pb, codec->time_base.den);
             put_be16(pb, codec->width);
@@ -168,7 +168,7 @@ static int ffm_write_header(AVFormatCont
             put_be32(pb, codec->refs);
             put_be32(pb, codec->directpred);
             break;
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             put_be32(pb, codec->sample_rate);
             put_le16(pb, codec->channels);
             put_le16(pb, codec->frame_size);

Modified: trunk/libavformat/filmstripdec.c
==============================================================================
--- trunk/libavformat/filmstripdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/filmstripdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -60,7 +60,7 @@ static int read_header(AVFormatContext *
     }
 
     url_fskip(pb, 2);
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_RAWVIDEO;
     st->codec->pix_fmt    = PIX_FMT_RGBA;
     st->codec->codec_tag  = 0; /* no fourcc */

Modified: trunk/libavformat/flacdec.c
==============================================================================
--- trunk/libavformat/flacdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/flacdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -36,7 +36,7 @@ static int flac_read_header(AVFormatCont
     AVStream *st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_FLAC;
     st->need_parsing = AVSTREAM_PARSE_FULL;
     /* the parameters will be extracted from the compressed bitstream */

Modified: trunk/libavformat/flic.c
==============================================================================
--- trunk/libavformat/flic.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/flic.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -103,7 +103,7 @@ static int flic_read_header(AVFormatCont
     if (!st)
         return AVERROR(ENOMEM);
     flic->video_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_FLIC;
     st->codec->codec_tag = 0;  /* no fourcc */
     st->codec->width = AV_RL16(&header[0x08]);

Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/flvdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -221,8 +221,8 @@ static int flv_read_metabody(AVFormatCon
     //find the streams now so that amf_parse_object doesn't need to do the lookup every time it is called.
     for(i = 0; i < s->nb_streams; i++) {
         stream = s->streams[i];
-        if     (stream->codec->codec_type == CODEC_TYPE_AUDIO) astream = stream;
-        else if(stream->codec->codec_type == CODEC_TYPE_VIDEO) vstream = stream;
+        if     (stream->codec->codec_type == AVMEDIA_TYPE_AUDIO) astream = stream;
+        else if(stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) vstream = stream;
     }
 
     //parse the second object (we want a mixed array)
@@ -236,7 +236,7 @@ static AVStream *create_stream(AVFormatC
     AVStream *st = av_new_stream(s, is_audio);
     if (!st)
         return NULL;
-    st->codec->codec_type = is_audio ? CODEC_TYPE_AUDIO : CODEC_TYPE_VIDEO;
+    st->codec->codec_type = is_audio ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO;
     av_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */
     return st;
 }

Modified: trunk/libavformat/flvenc.c
==============================================================================
--- trunk/libavformat/flvenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/flvenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -166,7 +166,7 @@ static int flv_write_header(AVFormatCont
 
     for(i=0; i<s->nb_streams; i++){
         AVCodecContext *enc = s->streams[i]->codec;
-        if (enc->codec_type == CODEC_TYPE_VIDEO) {
+        if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
             if (s->streams[i]->r_frame_rate.den && s->streams[i]->r_frame_rate.num) {
                 framerate = av_q2d(s->streams[i]->r_frame_rate);
             } else {
@@ -275,7 +275,7 @@ static int flv_write_header(AVFormatCont
         AVCodecContext *enc = s->streams[i]->codec;
         if (enc->codec_id == CODEC_ID_AAC || enc->codec_id == CODEC_ID_H264) {
             int64_t pos;
-            put_byte(pb, enc->codec_type == CODEC_TYPE_VIDEO ?
+            put_byte(pb, enc->codec_type == AVMEDIA_TYPE_VIDEO ?
                      FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO);
             put_be24(pb, 0); // size patched later
             put_be24(pb, 0); // ts
@@ -342,7 +342,7 @@ static int flv_write_packet(AVFormatCont
     else
         flags_size= 1;
 
-    if (enc->codec_type == CODEC_TYPE_VIDEO) {
+    if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
         put_byte(pb, FLV_TAG_TYPE_VIDEO);
 
         flags = enc->codec_tag;
@@ -353,7 +353,7 @@ static int flv_write_packet(AVFormatCont
 
         flags |= pkt->flags & PKT_FLAG_KEY ? FLV_FRAME_KEY : FLV_FRAME_INTER;
     } else {
-        assert(enc->codec_type == CODEC_TYPE_AUDIO);
+        assert(enc->codec_type == AVMEDIA_TYPE_AUDIO);
         flags = get_audio_flags(enc);
 
         assert(size);

Modified: trunk/libavformat/gif.c
==============================================================================
--- trunk/libavformat/gif.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/gif.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -266,7 +266,7 @@ static int gif_write_header(AVFormatCont
     video_enc = NULL;
     for(i=0;i<s->nb_streams;i++) {
         enc = s->streams[i]->codec;
-        if (enc->codec_type != CODEC_TYPE_AUDIO)
+        if (enc->codec_type != AVMEDIA_TYPE_AUDIO)
             video_enc = enc;
     }
 
@@ -329,7 +329,7 @@ static int gif_write_video(AVFormatConte
 static int gif_write_packet(AVFormatContext *s, AVPacket *pkt)
 {
     AVCodecContext *codec = s->streams[pkt->stream_index]->codec;
-    if (codec->codec_type == CODEC_TYPE_AUDIO)
+    if (codec->codec_type == AVMEDIA_TYPE_AUDIO)
         return 0; /* just ignore audio */
     else
         return gif_write_video(s, codec, pkt->data, pkt->size);

Modified: trunk/libavformat/gxf.c
==============================================================================
--- trunk/libavformat/gxf.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/gxf.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -87,34 +87,34 @@ static int get_sindex(AVFormatContext *s
     switch (format) {
         case 3:
         case 4:
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_id = CODEC_ID_MJPEG;
             break;
         case 13:
         case 15:
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_id = CODEC_ID_DVVIDEO;
             break;
         case 14:
         case 16:
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_id = CODEC_ID_DVVIDEO;
             break;
         case 11:
         case 12:
         case 20:
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
             st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.
             break;
         case 22:
         case 23:
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_id = CODEC_ID_MPEG1VIDEO;
             st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.
             break;
         case 9:
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             st->codec->codec_id = CODEC_ID_PCM_S24LE;
             st->codec->channels = 1;
             st->codec->sample_rate = 48000;
@@ -123,7 +123,7 @@ static int get_sindex(AVFormatContext *s
             st->codec->bits_per_coded_sample = 24;
             break;
         case 10:
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             st->codec->codec_id = CODEC_ID_PCM_S16LE;
             st->codec->channels = 1;
             st->codec->sample_rate = 48000;
@@ -132,7 +132,7 @@ static int get_sindex(AVFormatContext *s
             st->codec->bits_per_coded_sample = 16;
             break;
         case 17:
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             st->codec->codec_id = CODEC_ID_AC3;
             st->codec->channels = 2;
             st->codec->sample_rate = 48000;
@@ -141,11 +141,11 @@ static int get_sindex(AVFormatContext *s
         case 7:
         case 8:
         case 24:
-            st->codec->codec_type = CODEC_TYPE_DATA;
+            st->codec->codec_type = AVMEDIA_TYPE_DATA;
             st->codec->codec_id = CODEC_ID_NONE;
             break;
         default:
-            st->codec->codec_type = CODEC_TYPE_UNKNOWN;
+            st->codec->codec_type = AVMEDIA_TYPE_UNKNOWN;
             st->codec->codec_id = CODEC_ID_NONE;
             break;
     }

Modified: trunk/libavformat/gxfenc.c
==============================================================================
--- trunk/libavformat/gxfenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/gxfenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -644,7 +644,7 @@ static int gxf_write_header(AVFormatCont
         st->priv_data = sc;
 
         sc->media_type = ff_codec_get_tag(gxf_media_types, st->codec->codec_id);
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             if (st->codec->codec_id != CODEC_ID_PCM_S16LE) {
                 av_log(s, AV_LOG_ERROR, "only 16 BIT PCM LE allowed for now\n");
                 return -1;
@@ -667,7 +667,7 @@ static int gxf_write_header(AVFormatCont
             gxf->audio_tracks++;
             gxf->flags |= 0x04000000; /* audio is 16 bit pcm */
             media_info = 'A';
-        } else if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+        } else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             if (i != 0) {
                 av_log(s, AV_LOG_ERROR, "video stream must be the first track\n");
                 return -1;
@@ -811,7 +811,7 @@ static int gxf_write_media_preamble(AVFo
     /* If the video is frame-encoded, the frame numbers shall be represented by
      * even field numbers.
      * see SMPTE360M-2004  6.4.2.1.3 Media field number */
-    if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+    if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         field_nb = gxf->nb_fields;
     } else {
         field_nb = av_rescale_rnd(pkt->dts, gxf->time_base.den,
@@ -821,7 +821,7 @@ static int gxf_write_media_preamble(AVFo
     put_byte(pb, sc->media_type);
     put_byte(pb, st->index);
     put_be32(pb, field_nb);
-    if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+    if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
         put_be16(pb, 0);
         put_be16(pb, size / 2);
     } else if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) {
@@ -859,13 +859,13 @@ static int gxf_write_packet(AVFormatCont
     gxf_write_packet_header(pb, PKT_MEDIA);
     if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */
         padding = 4 - pkt->size % 4;
-    else if (st->codec->codec_type == CODEC_TYPE_AUDIO)
+    else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
         padding = GXF_AUDIO_PACKET_SIZE - pkt->size;
     gxf_write_media_preamble(s, pkt, pkt->size + padding);
     put_buffer(pb, pkt->data, pkt->size);
     gxf_write_padding(pb, padding);
 
-    if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+    if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         if (!(gxf->flt_entries_nb % 500)) {
             gxf->flt_entries = av_realloc(gxf->flt_entries,
                                           (gxf->flt_entries_nb+500)*sizeof(*gxf->flt_entries));
@@ -901,7 +901,7 @@ static int gxf_compare_field_nb(AVFormat
     for (i = 0; i < 2; i++) {
         AVStream *st = s->streams[pkt[i]->stream_index];
         sc[i] = st->priv_data;
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             field_nb[i] = av_rescale_rnd(pkt[i]->dts, gxf->time_base.den,
                                          (int64_t)48000*gxf->time_base.num, AV_ROUND_UP);
             field_nb[i] &= ~1; // compare against even field number because audio must be before video
@@ -915,7 +915,7 @@ static int gxf_compare_field_nb(AVFormat
 
 static int gxf_interleave_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush)
 {
-    if (pkt && s->streams[pkt->stream_index]->codec->codec_type == CODEC_TYPE_VIDEO)
+    if (pkt && s->streams[pkt->stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
         pkt->duration = 2; // enforce 2 fields
     return ff_audio_rechunk_interleave(s, out, pkt, flush,
                                av_interleave_packet_per_dts, gxf_compare_field_nb);

Modified: trunk/libavformat/idcin.c
==============================================================================
--- trunk/libavformat/idcin.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/idcin.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -160,7 +160,7 @@ static int idcin_read_header(AVFormatCon
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, IDCIN_FPS);
     idcin->video_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_IDCIN;
     st->codec->codec_tag = 0;  /* no fourcc */
     st->codec->width = width;
@@ -183,7 +183,7 @@ static int idcin_read_header(AVFormatCon
             return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, IDCIN_FPS);
         idcin->audio_stream_index = st->index;
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_tag = 1;
         st->codec->channels = channels;
         st->codec->sample_rate = sample_rate;

Modified: trunk/libavformat/idroq.c
==============================================================================
--- trunk/libavformat/idroq.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/idroq.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -89,7 +89,7 @@ static int roq_read_header(AVFormatConte
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 63, 1, framerate);
     roq->video_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_ROQ;
     st->codec->codec_tag = 0;  /* no fourcc */
 
@@ -171,7 +171,7 @@ static int roq_read_packet(AVFormatConte
                     return AVERROR(ENOMEM);
                 av_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE);
                 roq->audio_stream_index = st->index;
-                st->codec->codec_type = CODEC_TYPE_AUDIO;
+                st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
                 st->codec->codec_id = CODEC_ID_ROQ_DPCM;
                 st->codec->codec_tag = 0;  /* no tag */
                 st->codec->channels = roq->audio_channels = chunk_type == RoQ_SOUND_STEREO ? 2 : 1;

Modified: trunk/libavformat/iff.c
==============================================================================
--- trunk/libavformat/iff.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/iff.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -119,7 +119,7 @@ static int iff_read_header(AVFormatConte
 
         switch(chunk_id) {
         case ID_VHDR:
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             url_fskip(pb, 12);
             st->codec->sample_rate = get_be16(pb);
             url_fskip(pb, 1);
@@ -146,7 +146,7 @@ static int iff_read_header(AVFormatConte
             break;
 
         case ID_BMHD:
-            st->codec->codec_type            = CODEC_TYPE_VIDEO;
+            st->codec->codec_type            = AVMEDIA_TYPE_VIDEO;
             st->codec->width                 = get_be16(pb);
             st->codec->height                = get_be16(pb);
             url_fskip(pb, 4); // x, y offset
@@ -175,7 +175,7 @@ static int iff_read_header(AVFormatConte
     }
 
     switch(st->codec->codec_type) {
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
     av_set_pts_info(st, 32, 1, st->codec->sample_rate);
 
     switch(compression) {
@@ -198,7 +198,7 @@ static int iff_read_header(AVFormatConte
     st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
     break;
 
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         switch (compression) {
         case BITMAP_RAW:
             if (st->codec->codec_tag == ID_ILBM) {
@@ -256,7 +256,7 @@ static int iff_read_packet(AVFormatConte
         st->codec->extradata_size = 0;
 
         ret = get_buffer(pb, pkt->data, iff->body_size);
-    } else if (s->streams[0]->codec->codec_type == CODEC_TYPE_VIDEO) {
+    } else if (s->streams[0]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         ret = av_get_packet(pb, pkt, iff->body_size);
     } else {
         ret = av_get_packet(pb, pkt, PACKET_SIZE);
@@ -265,13 +265,13 @@ static int iff_read_packet(AVFormatConte
     if(iff->sent_bytes == 0)
         pkt->flags |= PKT_FLAG_KEY;
 
-    if(s->streams[0]->codec->codec_type == CODEC_TYPE_AUDIO) {
+    if(s->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
         iff->sent_bytes += PACKET_SIZE;
     } else {
         iff->sent_bytes = iff->body_size;
     }
     pkt->stream_index = 0;
-    if(s->streams[0]->codec->codec_type == CODEC_TYPE_AUDIO) {
+    if(s->streams[0]->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
         pkt->pts = iff->audio_frame_count;
         iff->audio_frame_count += ret / s->streams[0]->codec->channels;
     }

Modified: trunk/libavformat/img2.c
==============================================================================
--- trunk/libavformat/img2.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/img2.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -233,16 +233,16 @@ static int img_read_header(AVFormatConte
     }
 
     if(s1->video_codec_id){
-        st->codec->codec_type = CODEC_TYPE_VIDEO;
+        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         st->codec->codec_id = s1->video_codec_id;
     }else if(s1->audio_codec_id){
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = s1->audio_codec_id;
     }else{
-        st->codec->codec_type = CODEC_TYPE_VIDEO;
+        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         st->codec->codec_id = av_str2id(img_tags, s->path);
     }
-    if(st->codec->codec_type == CODEC_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE)
+    if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE)
         st->codec->pix_fmt = ap->pix_fmt;
 
     return 0;

Modified: trunk/libavformat/ipmovie.c
==============================================================================
--- trunk/libavformat/ipmovie.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/ipmovie.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -566,7 +566,7 @@ static int ipmovie_read_header(AVFormatC
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 63, 1, 1000000);
     ipmovie->video_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO;
     st->codec->codec_tag = 0;  /* no fourcc */
     st->codec->width = ipmovie->video_width;
@@ -582,7 +582,7 @@ static int ipmovie_read_header(AVFormatC
             return AVERROR(ENOMEM);
         av_set_pts_info(st, 32, 1, ipmovie->audio_sample_rate);
         ipmovie->audio_stream_index = st->index;
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = ipmovie->audio_type;
         st->codec->codec_tag = 0;  /* no tag */
         st->codec->channels = ipmovie->audio_channels;

Modified: trunk/libavformat/iss.c
==============================================================================
--- trunk/libavformat/iss.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/iss.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -92,7 +92,7 @@ static av_cold int iss_read_header(AVFor
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_ADPCM_IMA_ISS;
     st->codec->channels = stereo ? 2 : 1;
     st->codec->sample_rate = 44100;

Modified: trunk/libavformat/iv8.c
==============================================================================
--- trunk/libavformat/iv8.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/iv8.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -44,7 +44,7 @@ static int read_header(AVFormatContext *
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_MPEG4;
     st->need_parsing = AVSTREAM_PARSE_FULL;
     av_set_pts_info(st, 64, 1, 90000);

Modified: trunk/libavformat/libnut.c
==============================================================================
--- trunk/libavformat/libnut.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/libnut.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -77,14 +77,14 @@ static int nut_write_header(AVFormatCont
         int fourcc = 0;
         int num, denom, ssize;
 
-        s[i].type = codec->codec_type == CODEC_TYPE_VIDEO ? NUT_VIDEO_CLASS : NUT_AUDIO_CLASS;
+        s[i].type = codec->codec_type == AVMEDIA_TYPE_VIDEO ? NUT_VIDEO_CLASS : NUT_AUDIO_CLASS;
 
         if (codec->codec_tag) fourcc = codec->codec_tag;
         else fourcc = ff_codec_get_tag(nut_tags, codec->codec_id);
 
         if (!fourcc) {
-            if (codec->codec_type == CODEC_TYPE_VIDEO) fourcc = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id);
-            if (codec->codec_type == CODEC_TYPE_AUDIO) fourcc = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
+            if (codec->codec_type == AVMEDIA_TYPE_VIDEO) fourcc = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id);
+            if (codec->codec_type == AVMEDIA_TYPE_AUDIO) fourcc = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
         }
 
         s[i].fourcc_len = 4;
@@ -102,7 +102,7 @@ static int nut_write_header(AVFormatCont
         s[i].codec_specific_len = codec->extradata_size;
         s[i].codec_specific = codec->extradata;
 
-        if (codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             s[i].width = codec->width;
             s[i].height = codec->height;
             s[i].sample_width = 0;
@@ -234,14 +234,14 @@ static int nut_read_header(AVFormatConte
 
         switch(s[i].type) {
         case NUT_AUDIO_CLASS:
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, st->codec->codec_tag);
 
             st->codec->channels = s[i].channel_count;
             st->codec->sample_rate = s[i].samplerate_num / s[i].samplerate_denom;
             break;
         case NUT_VIDEO_CLASS:
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag);
 
             st->codec->width = s[i].width;

Modified: trunk/libavformat/lmlm4.c
==============================================================================
--- trunk/libavformat/lmlm4.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/lmlm4.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -62,14 +62,14 @@ static int lmlm4_read_header(AVFormatCon
 
     if (!(st = av_new_stream(s, 0)))
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_MPEG4;
     st->need_parsing      = AVSTREAM_PARSE_HEADERS;
     av_set_pts_info(st, 64, 1001, 30000);
 
     if (!(st = av_new_stream(s, 1)))
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id   = CODEC_ID_MP2;
     st->need_parsing      = AVSTREAM_PARSE_HEADERS;
 

Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/matroskadec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1378,7 +1378,7 @@ static int matroska_read_header(AVFormat
         }
 
         if (track->type == MATROSKA_TRACK_TYPE_VIDEO) {
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_tag  = track->video.fourcc;
             st->codec->width  = track->video.pixel_width;
             st->codec->height = track->video.pixel_height;
@@ -1390,11 +1390,11 @@ static int matroska_read_header(AVFormat
             if (st->codec->codec_id != CODEC_ID_H264)
             st->need_parsing = AVSTREAM_PARSE_HEADERS;
         } else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             st->codec->sample_rate = track->audio.out_samplerate;
             st->codec->channels = track->audio.channels;
         } else if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE) {
-            st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+            st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
         }
     }
 
@@ -1409,7 +1409,7 @@ static int matroska_read_header(AVFormat
                 break;
             av_metadata_set(&st->metadata, "filename",attachements[j].filename);
             st->codec->codec_id = CODEC_ID_NONE;
-            st->codec->codec_type = CODEC_TYPE_ATTACHMENT;
+            st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
             st->codec->extradata  = av_malloc(attachements[j].bin.size);
             if(st->codec->extradata == NULL)
                 break;

Modified: trunk/libavformat/matroskaenc.c
==============================================================================
--- trunk/libavformat/matroskaenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/matroskaenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -475,7 +475,7 @@ static int mkv_write_codecprivate(AVForm
             ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size);
         else if (codec->extradata_size)
             put_buffer(dyn_cp, codec->extradata, codec->extradata_size);
-    } else if (codec->codec_type == CODEC_TYPE_VIDEO) {
+    } else if (codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         if (qt_id) {
             if (!codec->codec_tag)
                 codec->codec_tag = ff_codec_get_tag(codec_movvideo_tags, codec->codec_id);
@@ -492,7 +492,7 @@ static int mkv_write_codecprivate(AVForm
             ff_put_bmp_header(dyn_cp, codec, ff_codec_bmp_tags, 0);
         }
 
-    } else if (codec->codec_type == CODEC_TYPE_AUDIO) {
+    } else if (codec->codec_type == AVMEDIA_TYPE_AUDIO) {
         unsigned int tag;
         tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
         if (!tag) {
@@ -565,7 +565,7 @@ static int mkv_write_tracks(AVFormatCont
         }
 
         switch (codec->codec_type) {
-            case CODEC_TYPE_VIDEO:
+            case AVMEDIA_TYPE_VIDEO:
                 put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_VIDEO);
 
                 if (!native_id &&
@@ -596,7 +596,7 @@ static int mkv_write_tracks(AVFormatCont
                 end_ebml_master(pb, subinfo);
                 break;
 
-            case CODEC_TYPE_AUDIO:
+            case AVMEDIA_TYPE_AUDIO:
                 put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_AUDIO);
 
                 if (!native_id)
@@ -613,7 +613,7 @@ static int mkv_write_tracks(AVFormatCont
                 end_ebml_master(pb, subinfo);
                 break;
 
-            case CODEC_TYPE_SUBTITLE:
+            case AVMEDIA_TYPE_SUBTITLE:
                 put_ebml_uint(pb, MATROSKA_ID_TRACKTYPE, MATROSKA_TRACK_TYPE_SUBTITLE);
                 break;
             default:
@@ -893,7 +893,7 @@ static int mkv_write_packet(AVFormatCont
         av_md5_update(mkv->md5_ctx, pkt->data, FFMIN(200, pkt->size));
     }
 
-    if (codec->codec_type != CODEC_TYPE_SUBTITLE) {
+    if (codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
         mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7);
     } else if (codec->codec_id == CODEC_ID_SSA) {
         duration = mkv_write_ass_blocks(s, pb, pkt);
@@ -905,7 +905,7 @@ static int mkv_write_packet(AVFormatCont
         end_ebml_master(pb, blockgroup);
     }
 
-    if (codec->codec_type == CODEC_TYPE_VIDEO && keyframe) {
+    if (codec->codec_type == AVMEDIA_TYPE_VIDEO && keyframe) {
         ret = mkv_add_cuepoint(mkv->cues, pkt->stream_index, ts, mkv->cluster_pos);
         if (ret < 0) return ret;
     }

Modified: trunk/libavformat/mm.c
==============================================================================
--- trunk/libavformat/mm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -108,7 +108,7 @@ static int read_header(AVFormatContext *
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_MMVIDEO;
     st->codec->codec_tag = 0;  /* no fourcc */
     st->codec->width = width;
@@ -120,7 +120,7 @@ static int read_header(AVFormatContext *
         st = av_new_stream(s, 0);
         if (!st)
             return AVERROR(ENOMEM);
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_tag = 0; /* no fourcc */
         st->codec->codec_id = CODEC_ID_PCM_U8;
         st->codec->channels = 1;

Modified: trunk/libavformat/mmf.c
==============================================================================
--- trunk/libavformat/mmf.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mmf.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -244,7 +244,7 @@ static int mmf_read_header(AVFormatConte
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA;
     st->codec->sample_rate = rate;
     st->codec->channels = 1;

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mov.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -411,13 +411,13 @@ static int mov_read_hdlr(MOVContext *c, 
     dprintf(c->fc, "stype= %.4s\n", (char*)&type);
 
     if     (type == MKTAG('v','i','d','e'))
-        st->codec->codec_type = CODEC_TYPE_VIDEO;
+        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     else if(type == MKTAG('s','o','u','n'))
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     else if(type == MKTAG('m','1','a',' '))
         st->codec->codec_id = CODEC_ID_MP2;
     else if(type == MKTAG('s','u','b','p'))
-        st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+        st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
 
     get_be32(pb); /* component  manufacture */
     get_be32(pb); /* component flags */
@@ -933,19 +933,19 @@ static int mov_read_stsd(MOVContext *c, 
         if (id<=0 && ((format&0xFFFF) == 'm'+('s'<<8) || (format&0xFFFF) == 'T'+('S'<<8)))
             id = ff_codec_get_id(ff_codec_wav_tags, bswap_32(format)&0xFFFF);
 
-        if (st->codec->codec_type != CODEC_TYPE_VIDEO && id > 0) {
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
-        } else if (st->codec->codec_type != CODEC_TYPE_AUDIO && /* do not overwrite codec type */
+        if (st->codec->codec_type != AVMEDIA_TYPE_VIDEO && id > 0) {
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
+        } else if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO && /* do not overwrite codec type */
                    format && format != MKTAG('m','p','4','s')) { /* skip old asf mpeg4 tag */
             id = ff_codec_get_id(codec_movvideo_tags, format);
             if (id <= 0)
                 id = ff_codec_get_id(ff_codec_bmp_tags, format);
             if (id > 0)
-                st->codec->codec_type = CODEC_TYPE_VIDEO;
-            else if(st->codec->codec_type == CODEC_TYPE_DATA){
+                st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
+            else if(st->codec->codec_type == AVMEDIA_TYPE_DATA){
                 id = ff_codec_get_id(ff_codec_movsubtitle_tags, format);
                 if(id > 0)
-                    st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+                    st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
             }
         }
 
@@ -953,7 +953,7 @@ static int mov_read_stsd(MOVContext *c, 
                 (format >> 0) & 0xff, (format >> 8) & 0xff, (format >> 16) & 0xff,
                 (format >> 24) & 0xff, st->codec->codec_type);
 
-        if(st->codec->codec_type==CODEC_TYPE_VIDEO) {
+        if(st->codec->codec_type==AVMEDIA_TYPE_VIDEO) {
             unsigned int color_depth, len;
             int color_greyscale;
 
@@ -1057,7 +1057,7 @@ static int mov_read_stsd(MOVContext *c, 
                 }
                 st->codec->palctrl->palette_changed = 1;
             }
-        } else if(st->codec->codec_type==CODEC_TYPE_AUDIO) {
+        } else if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO) {
             int bits_per_sample, flags;
             uint16_t version = get_be16(pb);
 
@@ -1137,7 +1137,7 @@ static int mov_read_stsd(MOVContext *c, 
                 st->codec->bits_per_coded_sample = bits_per_sample;
                 sc->sample_size = (bits_per_sample >> 3) * st->codec->channels;
             }
-        } else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){
+        } else if(st->codec->codec_type==AVMEDIA_TYPE_SUBTITLE){
             // ttxt stsd contains display flags, justification, background
             // color, fonts, and default styles, so fake an atom to read it
             MOVAtom fake_atom = { .size = size - (url_ftell(pb) - start_pos) };
@@ -1159,7 +1159,7 @@ static int mov_read_stsd(MOVContext *c, 
             url_fskip(pb, a.size);
     }
 
-    if(st->codec->codec_type==CODEC_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1)
+    if(st->codec->codec_type==AVMEDIA_TYPE_AUDIO && st->codec->sample_rate==0 && sc->time_scale>1)
         st->codec->sample_rate= sc->time_scale;
 
     /* special codec parameters handling */
@@ -1196,7 +1196,7 @@ static int mov_read_stsd(MOVContext *c, 
         break;
     case CODEC_ID_MP2:
     case CODEC_ID_MP3:
-        st->codec->codec_type = CODEC_TYPE_AUDIO; /* force type after stsd for m1a hdlr */
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO; /* force type after stsd for m1a hdlr */
         st->need_parsing = AVSTREAM_PARSE_FULL;
         break;
     case CODEC_ID_GSM:
@@ -1490,7 +1490,7 @@ static void mov_build_index(MOVContext *
     }
 
     /* only use old uncompressed audio chunk demuxing when stts specifies it */
-    if (!(st->codec->codec_type == CODEC_TYPE_AUDIO &&
+    if (!(st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
           sc->stts_count == 1 && sc->stts_data[0].duration == 1)) {
         unsigned int current_sample = 0;
         unsigned int stts_sample = 0;
@@ -1698,7 +1698,7 @@ static int mov_read_trak(MOVContext *c, 
     if (!sc) return AVERROR(ENOMEM);
 
     st->priv_data = sc;
-    st->codec->codec_type = CODEC_TYPE_DATA;
+    st->codec->codec_type = AVMEDIA_TYPE_DATA;
     sc->ffindex = st->index;
 
     if ((ret = mov_read_default(c, pb, atom)) < 0)
@@ -1721,7 +1721,7 @@ static int mov_read_trak(MOVContext *c, 
 
     av_set_pts_info(st, 64, 1, sc->time_scale);
 
-    if (st->codec->codec_type == CODEC_TYPE_AUDIO &&
+    if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
         !st->codec->frame_size && sc->stts_count == 1) {
         st->codec->frame_size = av_rescale(sc->stts_data[0].duration,
                                            st->codec->sample_rate, sc->time_scale);
@@ -1741,7 +1741,7 @@ static int mov_read_trak(MOVContext *c, 
     } else
         sc->pb = c->fc->pb;
 
-    if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+    if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         if (st->codec->width != sc->width || st->codec->height != sc->height) {
             AVRational r = av_d2q(((double)st->codec->height * sc->width) /
                                   ((double)st->codec->width * sc->height), INT_MAX);
@@ -2004,7 +2004,7 @@ static int mov_read_trun(MOVContext *c, 
             sc->ctts_data[sc->ctts_count].duration = get_be32(pb);
             sc->ctts_count++;
         }
-        if ((keyframe = st->codec->codec_type == CODEC_TYPE_AUDIO ||
+        if ((keyframe = st->codec->codec_type == AVMEDIA_TYPE_AUDIO ||
              (flags & 0x004 && !i && !sample_flags) || sample_flags & 0x2000000))
             distance = 0;
         av_add_index_entry(st, offset, dts, sample_size, distance,

Modified: trunk/libavformat/movenc.c
==============================================================================
--- trunk/libavformat/movenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/movenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -333,7 +333,7 @@ static int mov_write_esds_tag(ByteIOCont
 
     // the following fields is made of 6 bits to identify the streamtype (4 for video, 5 for audio)
     // plus 1 bit to indicate upstream and 1 bit set to 1 (reserved)
-    if(track->enc->codec_type == CODEC_TYPE_AUDIO)
+    if(track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
         put_byte(pb, 0x15); // flags (= Audiostream)
     else
         put_byte(pb, 0x11); // flags (= Visualstream)
@@ -620,8 +620,8 @@ static int mp4_get_codec_tag(AVFormatCon
     else if (track->enc->codec_id == CODEC_ID_AC3)       tag = MKTAG('a','c','-','3');
     else if (track->enc->codec_id == CODEC_ID_DIRAC)     tag = MKTAG('d','r','a','c');
     else if (track->enc->codec_id == CODEC_ID_MOV_TEXT)  tag = MKTAG('t','x','3','g');
-    else if (track->enc->codec_type == CODEC_TYPE_VIDEO) tag = MKTAG('m','p','4','v');
-    else if (track->enc->codec_type == CODEC_TYPE_AUDIO) tag = MKTAG('m','p','4','a');
+    else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) tag = MKTAG('m','p','4','v');
+    else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) tag = MKTAG('m','p','4','a');
 
     return tag;
 }
@@ -642,7 +642,7 @@ static int ipod_get_codec_tag(AVFormatCo
     int tag = track->enc->codec_tag;
 
     // keep original tag for subs, ipod supports both formats
-    if (!(track->enc->codec_type == CODEC_TYPE_SUBTITLE &&
+    if (!(track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE &&
         (tag == MKTAG('t','x','3','g') ||
          tag == MKTAG('t','e','x','t'))))
         tag = ff_codec_get_tag(codec_ipod_tags, track->enc->codec_id);
@@ -714,7 +714,7 @@ static int mov_get_codec_tag(AVFormatCon
             tag = mov_get_dv_codec_tag(s, track);
         else if (track->enc->codec_id == CODEC_ID_RAWVIDEO)
             tag = mov_get_rawvideo_codec_tag(s, track);
-        else if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
+        else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
             tag = ff_codec_get_tag(codec_movvideo_tags, track->enc->codec_id);
             if (!tag) { // if no mac fcc found, try with Microsoft tags
                 tag = ff_codec_get_tag(ff_codec_bmp_tags, track->enc->codec_id);
@@ -722,7 +722,7 @@ static int mov_get_codec_tag(AVFormatCon
                     av_log(s, AV_LOG_INFO, "Warning, using MS style video codec tag, "
                            "the file may be unplayable!\n");
             }
-        } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) {
+        } else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
             tag = ff_codec_get_tag(codec_movaudio_tags, track->enc->codec_id);
             if (!tag) { // if no mac fcc found, try with Microsoft tags
                 int ms_tag = ff_codec_get_tag(ff_codec_wav_tags, track->enc->codec_id);
@@ -732,7 +732,7 @@ static int mov_get_codec_tag(AVFormatCon
                            "the file may be unplayable!\n");
                 }
             }
-        } else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE)
+        } else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE)
             tag = ff_codec_get_tag(ff_codec_movsubtitle_tags, track->enc->codec_id);
     }
 
@@ -868,11 +868,11 @@ static int mov_write_stsd_tag(ByteIOCont
     put_tag(pb, "stsd");
     put_be32(pb, 0); /* version & flags */
     put_be32(pb, 1); /* entry count */
-    if (track->enc->codec_type == CODEC_TYPE_VIDEO)
+    if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO)
         mov_write_video_tag(pb, track);
-    else if (track->enc->codec_type == CODEC_TYPE_AUDIO)
+    else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
         mov_write_audio_tag(pb, track);
-    else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE)
+    else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE)
         mov_write_subtitle_tag(pb, track);
     return updateSize(pb, pos);
 }
@@ -918,7 +918,7 @@ static int mov_write_stts_tag(ByteIOCont
     uint32_t atom_size;
     int i;
 
-    if (track->enc->codec_type == CODEC_TYPE_AUDIO && !track->audio_vbr) {
+    if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO && !track->audio_vbr) {
         stts_entries = av_malloc(sizeof(*stts_entries)); /* one entry */
         stts_entries[0].count = track->sampleCount;
         stts_entries[0].duration = 1;
@@ -973,12 +973,12 @@ static int mov_write_stbl_tag(ByteIOCont
     put_tag(pb, "stbl");
     mov_write_stsd_tag(pb, track);
     mov_write_stts_tag(pb, track);
-    if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
+    if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO &&
         track->hasKeyframes && track->hasKeyframes < track->entry)
         mov_write_stss_tag(pb, track, MOV_SYNC_SAMPLE);
     if (track->mode == MODE_MOV && track->flags & MOV_TRACK_STPS)
         mov_write_stss_tag(pb, track, MOV_PARTIAL_SYNC_SAMPLE);
-    if (track->enc->codec_type == CODEC_TYPE_VIDEO &&
+    if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO &&
         track->flags & MOV_TRACK_CTTS)
         mov_write_ctts_tag(pb, track);
     mov_write_stsc_tag(pb, track);
@@ -1050,13 +1050,13 @@ static int mov_write_hdlr_tag(ByteIOCont
         descr = "DataHandler";
     } else {
         hdlr = (track->mode == MODE_MOV) ? "mhlr" : "\0\0\0\0";
-        if (track->enc->codec_type == CODEC_TYPE_VIDEO) {
+        if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
             hdlr_type = "vide";
             descr = "VideoHandler";
-        } else if (track->enc->codec_type == CODEC_TYPE_AUDIO) {
+        } else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
             hdlr_type = "soun";
             descr = "SoundHandler";
-        } else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) {
+        } else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
             if (track->tag == MKTAG('t','x','3','g')) hdlr_type = "sbtl";
             else                                      hdlr_type = "text";
             descr = "SubtitleHandler";
@@ -1084,11 +1084,11 @@ static int mov_write_minf_tag(ByteIOCont
     int64_t pos = url_ftell(pb);
     put_be32(pb, 0); /* size */
     put_tag(pb, "minf");
-    if(track->enc->codec_type == CODEC_TYPE_VIDEO)
+    if(track->enc->codec_type == AVMEDIA_TYPE_VIDEO)
         mov_write_vmhd_tag(pb);
-    else if (track->enc->codec_type == CODEC_TYPE_AUDIO)
+    else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
         mov_write_smhd_tag(pb);
-    else if (track->enc->codec_type == CODEC_TYPE_SUBTITLE) {
+    else if (track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
         if (track->tag == MKTAG('t','e','x','t')) mov_write_gmhd_tag(pb);
         else                                      mov_write_nmhd_tag(pb);
     }
@@ -1165,7 +1165,7 @@ static int mov_write_tkhd_tag(ByteIOCont
     put_be32(pb, 0); /* reserved */
     put_be32(pb, 0x0); /* reserved (Layer & Alternate group) */
     /* Volume, only for audio */
-    if(track->enc->codec_type == CODEC_TYPE_AUDIO)
+    if(track->enc->codec_type == AVMEDIA_TYPE_AUDIO)
         put_be16(pb, 0x0100);
     else
         put_be16(pb, 0);
@@ -1183,8 +1183,8 @@ static int mov_write_tkhd_tag(ByteIOCont
     put_be32(pb, 0x40000000); /* reserved */
 
     /* Track width and height, for visual only */
-    if(track->enc->codec_type == CODEC_TYPE_VIDEO ||
-       track->enc->codec_type == CODEC_TYPE_SUBTITLE) {
+    if(track->enc->codec_type == AVMEDIA_TYPE_VIDEO ||
+       track->enc->codec_type == AVMEDIA_TYPE_SUBTITLE) {
         double sample_aspect_ratio = av_q2d(st->sample_aspect_ratio);
         if(!sample_aspect_ratio || track->height != track->enc->height)
             sample_aspect_ratio = 1;
@@ -1671,7 +1671,7 @@ static int mov_write_ftyp_tag(ByteIOCont
 
     for (i = 0; i < s->nb_streams; i++) {
         AVStream *st = s->streams[i];
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO)
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
             has_video = 1;
         if (st->codec->codec_id == CODEC_ID_H264)
             has_h264 = 1;
@@ -1829,7 +1829,7 @@ static int mov_write_header(AVFormatCont
                    "codec not currently supported in container\n", i);
             goto error;
         }
-        if(st->codec->codec_type == CODEC_TYPE_VIDEO){
+        if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
             if (track->tag == MKTAG('m','x','3','p') || track->tag == MKTAG('m','x','3','n') ||
                 track->tag == MKTAG('m','x','4','p') || track->tag == MKTAG('m','x','4','n') ||
                 track->tag == MKTAG('m','x','5','p') || track->tag == MKTAG('m','x','5','n')) {
@@ -1845,7 +1845,7 @@ static int mov_write_header(AVFormatCont
                        "WARNING codec timebase is very high. If duration is too long,\n"
                        "file may not be playable by quicktime. Specify a shorter timebase\n"
                        "or choose different container.\n");
-        }else if(st->codec->codec_type == CODEC_TYPE_AUDIO){
+        }else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO){
             track->timescale = st->codec->sample_rate;
             if(!st->codec->frame_size && !av_get_bits_per_sample(st->codec->codec_id)) {
                 av_log(s, AV_LOG_ERROR, "track %d: codec frame size is not set\n", i);
@@ -1868,7 +1868,7 @@ static int mov_write_header(AVFormatCont
                     goto error;
                 }
             }
-        }else if(st->codec->codec_type == CODEC_TYPE_SUBTITLE){
+        }else if(st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE){
             track->timescale = st->codec->time_base.den;
         }
         if (!track->height)

Modified: trunk/libavformat/mp3.c
==============================================================================
--- trunk/libavformat/mp3.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mp3.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -140,7 +140,7 @@ static int mp3_read_header(AVFormatConte
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_MP3;
     st->need_parsing = AVSTREAM_PARSE_FULL;
     st->start_time = 0;

Modified: trunk/libavformat/mpc.c
==============================================================================
--- trunk/libavformat/mpc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mpc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -104,7 +104,7 @@ static int mpc_read_header(AVFormatConte
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_MUSEPACK7;
     st->codec->channels = 2;
     st->codec->bits_per_coded_sample = 16;

Modified: trunk/libavformat/mpc8.c
==============================================================================
--- trunk/libavformat/mpc8.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mpc8.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -224,7 +224,7 @@ static int mpc8_read_header(AVFormatCont
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_MUSEPACK8;
     st->codec->bits_per_coded_sample = 16;
 

Modified: trunk/libavformat/mpeg.c
==============================================================================
--- trunk/libavformat/mpeg.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mpeg.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -417,7 +417,7 @@ static int mpegps_read_packet(AVFormatCo
     AVStream *st;
     int len, startcode, i, es_type;
     enum CodecID codec_id = CODEC_ID_NONE;
-    enum CodecType type;
+    enum AVMediaType type;
     int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work
     uint8_t av_uninit(dvdaudio_substream_type);
 
@@ -443,26 +443,26 @@ static int mpegps_read_packet(AVFormatCo
     if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA){
         if(es_type == STREAM_TYPE_VIDEO_MPEG1){
             codec_id = CODEC_ID_MPEG2VIDEO;
-            type = CODEC_TYPE_VIDEO;
+            type = AVMEDIA_TYPE_VIDEO;
         } else if(es_type == STREAM_TYPE_VIDEO_MPEG2){
             codec_id = CODEC_ID_MPEG2VIDEO;
-            type = CODEC_TYPE_VIDEO;
+            type = AVMEDIA_TYPE_VIDEO;
         } else if(es_type == STREAM_TYPE_AUDIO_MPEG1 ||
                   es_type == STREAM_TYPE_AUDIO_MPEG2){
             codec_id = CODEC_ID_MP3;
-            type = CODEC_TYPE_AUDIO;
+            type = AVMEDIA_TYPE_AUDIO;
         } else if(es_type == STREAM_TYPE_AUDIO_AAC){
             codec_id = CODEC_ID_AAC;
-            type = CODEC_TYPE_AUDIO;
+            type = AVMEDIA_TYPE_AUDIO;
         } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){
             codec_id = CODEC_ID_MPEG4;
-            type = CODEC_TYPE_VIDEO;
+            type = AVMEDIA_TYPE_VIDEO;
         } else if(es_type == STREAM_TYPE_VIDEO_H264){
             codec_id = CODEC_ID_H264;
-            type = CODEC_TYPE_VIDEO;
+            type = AVMEDIA_TYPE_VIDEO;
         } else if(es_type == STREAM_TYPE_AUDIO_AC3){
             codec_id = CODEC_ID_AC3;
-            type = CODEC_TYPE_AUDIO;
+            type = AVMEDIA_TYPE_AUDIO;
         } else {
             goto skip;
         }
@@ -475,38 +475,38 @@ static int mpegps_read_packet(AVFormatCo
             codec_id = CODEC_ID_CAVS;
         else
             codec_id = CODEC_ID_PROBE;
-        type = CODEC_TYPE_VIDEO;
+        type = AVMEDIA_TYPE_VIDEO;
     } else if (startcode >= 0x1c0 && startcode <= 0x1df) {
-        type = CODEC_TYPE_AUDIO;
+        type = AVMEDIA_TYPE_AUDIO;
         codec_id = m->sofdec > 0 ? CODEC_ID_ADPCM_ADX : CODEC_ID_MP2;
     } else if (startcode >= 0x80 && startcode <= 0x87) {
-        type = CODEC_TYPE_AUDIO;
+        type = AVMEDIA_TYPE_AUDIO;
         codec_id = CODEC_ID_AC3;
     } else if (  ( startcode >= 0x88 && startcode <= 0x8f)
                ||( startcode >= 0x98 && startcode <= 0x9f)) {
         /* 0x90 - 0x97 is reserved for SDDS in DVD specs */
-        type = CODEC_TYPE_AUDIO;
+        type = AVMEDIA_TYPE_AUDIO;
         codec_id = CODEC_ID_DTS;
     } else if (startcode >= 0xa0 && startcode <= 0xaf) {
-        type = CODEC_TYPE_AUDIO;
+        type = AVMEDIA_TYPE_AUDIO;
         /* 16 bit form will be handled as CODEC_ID_PCM_S16BE */
         codec_id = CODEC_ID_PCM_DVD;
     } else if (startcode >= 0xb0 && startcode <= 0xbf) {
-        type = CODEC_TYPE_AUDIO;
+        type = AVMEDIA_TYPE_AUDIO;
         codec_id = CODEC_ID_TRUEHD;
     } else if (startcode >= 0xc0 && startcode <= 0xcf) {
         /* Used for both AC-3 and E-AC-3 in EVOB files */
-        type = CODEC_TYPE_AUDIO;
+        type = AVMEDIA_TYPE_AUDIO;
         codec_id = CODEC_ID_AC3;
     } else if (startcode >= 0x20 && startcode <= 0x3f) {
-        type = CODEC_TYPE_SUBTITLE;
+        type = AVMEDIA_TYPE_SUBTITLE;
         codec_id = CODEC_ID_DVD_SUBTITLE;
     } else if (startcode >= 0xfd55 && startcode <= 0xfd5f) {
-        type = CODEC_TYPE_VIDEO;
+        type = AVMEDIA_TYPE_VIDEO;
         codec_id = CODEC_ID_VC1;
     } else if (startcode == 0x1bd) {
         // check dvd audio substream type
-        type = CODEC_TYPE_AUDIO;
+        type = AVMEDIA_TYPE_AUDIO;
         switch(dvdaudio_substream_type & 0xe0) {
         case 0xa0:  codec_id = CODEC_ID_PCM_DVD;
                     break;

Modified: trunk/libavformat/mpegenc.c
==============================================================================
--- trunk/libavformat/mpegenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mpegenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -335,7 +335,7 @@ static int mpeg_mux_init(AVFormatContext
         av_set_pts_info(st, 64, 1, 90000);
 
         switch(st->codec->codec_type) {
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             if        (st->codec->codec_id == CODEC_ID_AC3) {
                 stream->id = ac3_id++;
             } else if (st->codec->codec_id == CODEC_ID_DTS) {
@@ -363,7 +363,7 @@ static int mpeg_mux_init(AVFormatContext
             stream->max_buffer_size = 4 * 1024;
             s->audio_bound++;
             break;
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             stream->id = mpv_id++;
             if (st->codec->rc_buffer_size)
                 stream->max_buffer_size = 6*1024 + st->codec->rc_buffer_size/8;
@@ -379,7 +379,7 @@ static int mpeg_mux_init(AVFormatContext
 #endif
             s->video_bound++;
             break;
-        case CODEC_TYPE_SUBTITLE:
+        case AVMEDIA_TYPE_SUBTITLE:
             stream->id = mps_id++;
             stream->max_buffer_size = 16 * 1024;
             break;
@@ -1046,7 +1046,7 @@ retry:
         /* for subtitle, a single PES packet must be generated,
            so we flush after every single subtitle packet */
         if(s->packet_size > avail_data && !flush
-           && st->codec->codec_type != CODEC_TYPE_SUBTITLE)
+           && st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE)
             return 0;
         if(avail_data==0)
             continue;
@@ -1156,7 +1156,7 @@ static int mpeg_mux_write_packet(AVForma
     int64_t pts, dts;
     PacketDesc *pkt_desc;
     const int preload= av_rescale(ctx->preload, 90000, AV_TIME_BASE);
-    const int is_iframe = st->codec->codec_type == CODEC_TYPE_VIDEO && (pkt->flags & PKT_FLAG_KEY);
+    const int is_iframe = st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (pkt->flags & PKT_FLAG_KEY);
 
     pts= pkt->pts;
     dts= pkt->dts;

Modified: trunk/libavformat/mpegts.c
==============================================================================
--- trunk/libavformat/mpegts.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mpegts.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -486,54 +486,54 @@ static int parse_section_header(SectionH
 
 typedef struct {
     uint32_t stream_type;
-    enum CodecType codec_type;
+    enum AVMediaType codec_type;
     enum CodecID codec_id;
 } StreamType;
 
 static const StreamType ISO_types[] = {
-    { 0x01, CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
-    { 0x02, CODEC_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
-    { 0x03, CODEC_TYPE_AUDIO,        CODEC_ID_MP3 },
-    { 0x04, CODEC_TYPE_AUDIO,        CODEC_ID_MP3 },
-    { 0x0f, CODEC_TYPE_AUDIO,        CODEC_ID_AAC },
-    { 0x10, CODEC_TYPE_VIDEO,      CODEC_ID_MPEG4 },
-    { 0x11, CODEC_TYPE_AUDIO,        CODEC_ID_AAC }, /* LATM syntax */
-    { 0x1b, CODEC_TYPE_VIDEO,       CODEC_ID_H264 },
-    { 0xd1, CODEC_TYPE_VIDEO,      CODEC_ID_DIRAC },
-    { 0xea, CODEC_TYPE_VIDEO,        CODEC_ID_VC1 },
+    { 0x01, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
+    { 0x02, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
+    { 0x03, AVMEDIA_TYPE_AUDIO,        CODEC_ID_MP3 },
+    { 0x04, AVMEDIA_TYPE_AUDIO,        CODEC_ID_MP3 },
+    { 0x0f, AVMEDIA_TYPE_AUDIO,        CODEC_ID_AAC },
+    { 0x10, AVMEDIA_TYPE_VIDEO,      CODEC_ID_MPEG4 },
+    { 0x11, AVMEDIA_TYPE_AUDIO,        CODEC_ID_AAC }, /* LATM syntax */
+    { 0x1b, AVMEDIA_TYPE_VIDEO,       CODEC_ID_H264 },
+    { 0xd1, AVMEDIA_TYPE_VIDEO,      CODEC_ID_DIRAC },
+    { 0xea, AVMEDIA_TYPE_VIDEO,        CODEC_ID_VC1 },
     { 0 },
 };
 
 static const StreamType HDMV_types[] = {
-    { 0x80, CODEC_TYPE_AUDIO, CODEC_ID_PCM_BLURAY },
-    { 0x81, CODEC_TYPE_AUDIO, CODEC_ID_AC3 },
-    { 0x82, CODEC_TYPE_AUDIO, CODEC_ID_DTS },
-    { 0x83, CODEC_TYPE_AUDIO, CODEC_ID_TRUEHD },
-    { 0x84, CODEC_TYPE_AUDIO, CODEC_ID_EAC3 },
-    { 0x90, CODEC_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE },
+    { 0x80, AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_BLURAY },
+    { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },
+    { 0x82, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
+    { 0x83, AVMEDIA_TYPE_AUDIO, CODEC_ID_TRUEHD },
+    { 0x84, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 },
+    { 0x90, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE },
     { 0 },
 };
 
 /* ATSC ? */
 static const StreamType MISC_types[] = {
-    { 0x81, CODEC_TYPE_AUDIO,   CODEC_ID_AC3 },
-    { 0x8a, CODEC_TYPE_AUDIO,   CODEC_ID_DTS },
+    { 0x81, AVMEDIA_TYPE_AUDIO,   CODEC_ID_AC3 },
+    { 0x8a, AVMEDIA_TYPE_AUDIO,   CODEC_ID_DTS },
     { 0 },
 };
 
 static const StreamType REGD_types[] = {
-    { MKTAG('d','r','a','c'), CODEC_TYPE_VIDEO, CODEC_ID_DIRAC },
-    { MKTAG('A','C','-','3'), CODEC_TYPE_AUDIO,   CODEC_ID_AC3 },
+    { MKTAG('d','r','a','c'), AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },
+    { MKTAG('A','C','-','3'), AVMEDIA_TYPE_AUDIO,   CODEC_ID_AC3 },
     { 0 },
 };
 
 /* descriptor present */
 static const StreamType DESC_types[] = {
-    { 0x6a, CODEC_TYPE_AUDIO,             CODEC_ID_AC3 }, /* AC-3 descriptor */
-    { 0x7a, CODEC_TYPE_AUDIO,            CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
-    { 0x7b, CODEC_TYPE_AUDIO,             CODEC_ID_DTS },
-    { 0x56, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
-    { 0x59, CODEC_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
+    { 0x6a, AVMEDIA_TYPE_AUDIO,             CODEC_ID_AC3 }, /* AC-3 descriptor */
+    { 0x7a, AVMEDIA_TYPE_AUDIO,            CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
+    { 0x7b, AVMEDIA_TYPE_AUDIO,             CODEC_ID_DTS },
+    { 0x56, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
+    { 0x59, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
     { 0 },
 };
 
@@ -554,7 +554,7 @@ static int mpegts_set_stream_info(AVStre
 {
     av_set_pts_info(st, 33, 1, 90000);
     st->priv_data = pes;
-    st->codec->codec_type = CODEC_TYPE_DATA;
+    st->codec->codec_type = AVMEDIA_TYPE_DATA;
     st->codec->codec_id   = CODEC_ID_NONE;
     st->need_parsing = AVSTREAM_PARSE_FULL;
     pes->st = st;
@@ -588,7 +588,7 @@ static int mpegts_set_stream_info(AVStre
 
             av_set_pts_info(sub_st, 33, 1, 90000);
             sub_st->priv_data = sub_pes;
-            sub_st->codec->codec_type = CODEC_TYPE_AUDIO;
+            sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             sub_st->codec->codec_id   = CODEC_ID_AC3;
             sub_st->need_parsing = AVSTREAM_PARSE_FULL;
             sub_pes->sub_st = pes->sub_st = sub_st;
@@ -1394,7 +1394,7 @@ static int mpegts_read_header(AVFormatCo
         if (!st)
             goto fail;
         av_set_pts_info(st, 60, 1, 27000000);
-        st->codec->codec_type = CODEC_TYPE_DATA;
+        st->codec->codec_type = AVMEDIA_TYPE_DATA;
         st->codec->codec_id = CODEC_ID_MPEG2TS;
 
         /* we iterate until we find two PCRs to estimate the bitrate */

Modified: trunk/libavformat/mpegtsenc.c
==============================================================================
--- trunk/libavformat/mpegtsenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mpegtsenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -255,7 +255,7 @@ static void mpegts_write_pmt(AVFormatCon
 
         /* write optional descriptors here */
         switch(st->codec->codec_type) {
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             if (lang && strlen(lang->value) == 3) {
                 *q++ = 0x0a; /* ISO 639 language descriptor */
                 *q++ = 4;
@@ -265,7 +265,7 @@ static void mpegts_write_pmt(AVFormatCon
                 *q++ = 0; /* undefined type */
             }
             break;
-        case CODEC_TYPE_SUBTITLE:
+        case AVMEDIA_TYPE_SUBTITLE:
             {
                 const char *language;
                 language = lang && strlen(lang->value)==3 ? lang->value : "eng";
@@ -279,7 +279,7 @@ static void mpegts_write_pmt(AVFormatCon
                 put16(&q, 1); /* ancillary page id */
             }
             break;
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             if (stream_type == STREAM_TYPE_VIDEO_DIRAC) {
                 *q++ = 0x05; /*MPEG-2 registration descriptor*/
                 *q++ = 4;
@@ -424,7 +424,7 @@ static int mpegts_write_header(AVFormatC
         ts_st->first_pts_check = 1;
         ts_st->cc = 15;
         /* update PCR pid by using the first video stream */
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO &&
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
             service->pcr_pid == 0x1fff) {
             service->pcr_pid = ts_st->pid;
             pcr_st = st;
@@ -462,7 +462,7 @@ static int mpegts_write_header(AVFormatC
         /* Arbitrary values, PAT/PMT could be written on key frames */
         ts->sdt_packet_period = 200;
         ts->pat_packet_period = 40;
-        if (pcr_st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (pcr_st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             if (!pcr_st->codec->frame_size) {
                 av_log(s, AV_LOG_WARNING, "frame size not set\n");
                 service->pcr_packet_period =
@@ -661,18 +661,18 @@ static void mpegts_write_pes(AVFormatCon
             *q++ = 0x00;
             *q++ = 0x01;
             private_code = 0;
-            if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+            if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
                 if (st->codec->codec_id == CODEC_ID_DIRAC) {
                     *q++ = 0xfd;
                 } else
                     *q++ = 0xe0;
-            } else if (st->codec->codec_type == CODEC_TYPE_AUDIO &&
+            } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
                        (st->codec->codec_id == CODEC_ID_MP2 ||
                         st->codec->codec_id == CODEC_ID_MP3)) {
                 *q++ = 0xc0;
             } else {
                 *q++ = 0xbd;
-                if (st->codec->codec_type == CODEC_TYPE_SUBTITLE) {
+                if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
                     private_code = 0x20;
                 }
             }
@@ -686,7 +686,7 @@ static void mpegts_write_pes(AVFormatCon
                 header_len += 5;
                 flags |= 0x40;
             }
-            if (st->codec->codec_type == CODEC_TYPE_VIDEO &&
+            if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
                 st->codec->codec_id == CODEC_ID_DIRAC) {
                 /* set PES_extension_flag */
                 pes_extension = 1;
@@ -708,7 +708,7 @@ static void mpegts_write_pes(AVFormatCon
             *q++ = len;
             val = 0x80;
             /* data alignment indicator is required for subtitle data */
-            if (st->codec->codec_type == CODEC_TYPE_SUBTITLE)
+            if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE)
                 val |= 0x04;
             *q++ = val;
             *q++ = flags;
@@ -848,7 +848,7 @@ static int mpegts_write_packet(AVFormatC
         }
     }
 
-    if (st->codec->codec_type != CODEC_TYPE_AUDIO) {
+    if (st->codec->codec_type != AVMEDIA_TYPE_AUDIO) {
         // for video and subtitle, write a single pes packet
         mpegts_write_pes(s, st, buf, size, pts, dts);
         av_free(data);

Modified: trunk/libavformat/msnwc_tcp.c
==============================================================================
--- trunk/libavformat/msnwc_tcp.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/msnwc_tcp.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -80,7 +80,7 @@ static int msnwc_tcp_read_header(AVForma
         return AVERROR_NOMEM;
 
     codec = st->codec;
-    codec->codec_type = CODEC_TYPE_VIDEO;
+    codec->codec_type = AVMEDIA_TYPE_VIDEO;
     codec->codec_id = CODEC_ID_MIMIC;
     codec->codec_tag = MKTAG('M', 'L', '2', '0');
 

Modified: trunk/libavformat/mtv.c
==============================================================================
--- trunk/libavformat/mtv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mtv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -123,7 +123,7 @@ static int mtv_read_header(AVFormatConte
         return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 64, 1, mtv->video_fps);
-    st->codec->codec_type      = CODEC_TYPE_VIDEO;
+    st->codec->codec_type      = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id        = CODEC_ID_RAWVIDEO;
     st->codec->codec_tag       = MKTAG('R', 'G', 'B', mtv->img_bpp);
     st->codec->width           = mtv->img_width;
@@ -140,7 +140,7 @@ static int mtv_read_header(AVFormatConte
         return AVERROR(ENOMEM);
 
     av_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE);
-    st->codec->codec_type      = CODEC_TYPE_AUDIO;
+    st->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id        = CODEC_ID_MP3;
     st->codec->bit_rate        = mtv->audio_br;
     st->need_parsing           = AVSTREAM_PARSE_FULL;

Modified: trunk/libavformat/mvi.c
==============================================================================
--- trunk/libavformat/mvi.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mvi.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -77,14 +77,14 @@ static int read_header(AVFormatContext *
     }
 
     av_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
-    ast->codec->codec_type      = CODEC_TYPE_AUDIO;
+    ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
     ast->codec->codec_id        = CODEC_ID_PCM_U8;
     ast->codec->channels        = 1;
     ast->codec->bits_per_coded_sample = 8;
     ast->codec->bit_rate        = ast->codec->sample_rate * 8;
 
     av_set_pts_info(vst, 64, msecs_per_frame, 1000000);
-    vst->codec->codec_type = CODEC_TYPE_VIDEO;
+    vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     vst->codec->codec_id   = CODEC_ID_MOTIONPIXELS;
 
     mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? get_le16 : get_le24;

Modified: trunk/libavformat/mxf.c
==============================================================================
--- trunk/libavformat/mxf.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mxf.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -25,9 +25,9 @@
  * SMPTE RP224 http://www.smpte-ra.org/mdd/index.html
  */
 const MXFCodecUL ff_mxf_data_definition_uls[] = {
-    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x01,0x00,0x00,0x00 }, 13, CODEC_TYPE_VIDEO },
-    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x02,0x00,0x00,0x00 }, 13, CODEC_TYPE_AUDIO },
-    { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,  CODEC_TYPE_DATA },
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x01,0x00,0x00,0x00 }, 13, AVMEDIA_TYPE_VIDEO },
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x01,0x03,0x02,0x02,0x02,0x00,0x00,0x00 }, 13, AVMEDIA_TYPE_AUDIO },
+    { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,  AVMEDIA_TYPE_DATA },
 };
 
 const MXFCodecUL ff_mxf_codec_uls[] = {

Modified: trunk/libavformat/mxfdec.c
==============================================================================
--- trunk/libavformat/mxfdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mxfdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -795,7 +795,7 @@ static int mxf_parse_structural_metadata
             st->codec->extradata = descriptor->extradata;
             st->codec->extradata_size = descriptor->extradata_size;
         }
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul);
             if (st->codec->codec_id == CODEC_ID_NONE)
                 st->codec->codec_id = container_ul->id;
@@ -803,7 +803,7 @@ static int mxf_parse_structural_metadata
             st->codec->height = descriptor->height;
             st->codec->bits_per_coded_sample = descriptor->bits_per_sample; /* Uncompressed */
             st->need_parsing = AVSTREAM_PARSE_HEADERS;
-        } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             container_ul = mxf_get_codec_ul(mxf_essence_container_uls, essence_container_ul);
             if (st->codec->codec_id == CODEC_ID_NONE)
                 st->codec->codec_id = container_ul->id;
@@ -825,7 +825,7 @@ static int mxf_parse_structural_metadata
                 st->need_parsing = AVSTREAM_PARSE_FULL;
             }
         }
-        if (st->codec->codec_type != CODEC_TYPE_DATA && (*essence_container_ul)[15] > 0x01) {
+        if (st->codec->codec_type != AVMEDIA_TYPE_DATA && (*essence_container_ul)[15] > 0x01) {
             av_log(mxf->fc, AV_LOG_WARNING, "only frame wrapped mappings are correctly supported\n");
             st->need_parsing = AVSTREAM_PARSE_FULL;
         }

Modified: trunk/libavformat/mxfenc.c
==============================================================================
--- trunk/libavformat/mxfenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/mxfenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -1415,7 +1415,7 @@ static int mxf_write_header(AVFormatCont
             return AVERROR(ENOMEM);
         st->priv_data = sc;
 
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             if (i != 0) {
                 av_log(s, AV_LOG_ERROR, "video stream must be first track\n");
                 return -1;
@@ -1455,7 +1455,7 @@ static int mxf_write_header(AVFormatCont
                 mxf->edit_unit_byte_count += 16 + 4 + 4 + samples_per_frame[0]*8*4;
                 mxf->edit_unit_byte_count += klv_fill_size(mxf->edit_unit_byte_count);
             }
-        } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             if (st->codec->sample_rate != 48000) {
                 av_log(s, AV_LOG_ERROR, "only 48khz is implemented\n");
                 return -1;
@@ -1717,7 +1717,7 @@ static int mxf_write_packet(AVFormatCont
     mxf_write_klv_fill(s);
     put_buffer(pb, sc->track_essence_element_key, 16); // write key
     if (s->oformat == &mxf_d10_muxer) {
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO)
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
             mxf_write_d10_video_packet(s, st, pkt);
         else
             mxf_write_d10_audio_packet(s, st, pkt);

Modified: trunk/libavformat/ncdec.c
==============================================================================
--- trunk/libavformat/ncdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/ncdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -50,7 +50,7 @@ static int nc_read_header(AVFormatContex
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_MPEG4;
     st->need_parsing      = AVSTREAM_PARSE_FULL;
 

Modified: trunk/libavformat/nsvdec.c
==============================================================================
--- trunk/libavformat/nsvdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/nsvdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -456,7 +456,7 @@ static int nsv_parse_NSVs_header(AVForma
             if (!nst)
                 goto fail;
             st->priv_data = nst;
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_tag = vtag;
             st->codec->codec_id = ff_codec_get_id(nsv_codec_video_tags, vtag);
             st->codec->width = vwidth;
@@ -487,7 +487,7 @@ static int nsv_parse_NSVs_header(AVForma
             if (!nst)
                 goto fail;
             st->priv_data = nst;
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             st->codec->codec_tag = atag;
             st->codec->codec_id = ff_codec_get_id(nsv_codec_audio_tags, atag);
 

Modified: trunk/libavformat/nutdec.c
==============================================================================
--- trunk/libavformat/nutdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/nutdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -315,19 +315,19 @@ static int decode_stream_header(NUTConte
     switch(class)
     {
         case 0:
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tmp);
             break;
         case 1:
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, tmp);
             break;
         case 2:
-            st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+            st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
             st->codec->codec_id = ff_codec_get_id(ff_nut_subtitle_tags, tmp);
             break;
         case 3:
-            st->codec->codec_type = CODEC_TYPE_DATA;
+            st->codec->codec_type = AVMEDIA_TYPE_DATA;
             break;
         default:
             av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class);
@@ -349,7 +349,7 @@ static int decode_stream_header(NUTConte
         get_buffer(bc, st->codec->extradata, st->codec->extradata_size);
     }
 
-    if (st->codec->codec_type == CODEC_TYPE_VIDEO){
+    if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
         GET_V(st->codec->width , tmp > 0)
         GET_V(st->codec->height, tmp > 0)
         st->sample_aspect_ratio.num= ff_get_v(bc);
@@ -359,7 +359,7 @@ static int decode_stream_header(NUTConte
             return -1;
         }
         ff_get_v(bc); /* csp type */
-    }else if (st->codec->codec_type == CODEC_TYPE_AUDIO){
+    }else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO){
         GET_V(st->codec->sample_rate , tmp > 0)
         ff_get_v(bc); // samplerate_den
         GET_V(st->codec->channels, tmp > 0)

Modified: trunk/libavformat/nutenc.c
==============================================================================
--- trunk/libavformat/nutenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/nutenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -152,7 +152,7 @@ static void build_frame_code(AVFormatCon
         int start2= start + (end-start)*stream_id / s->nb_streams;
         int end2  = start + (end-start)*(stream_id+1) / s->nb_streams;
         AVCodecContext *codec = s->streams[stream_id]->codec;
-        int is_audio= codec->codec_type == CODEC_TYPE_AUDIO;
+        int is_audio= codec->codec_type == AVMEDIA_TYPE_AUDIO;
         int intra_only= /*codec->intra_only || */is_audio;
         int pred_count;
 
@@ -394,9 +394,9 @@ static int write_streamheader(NUTContext
     AVCodecContext *codec = st->codec;
     put_v(bc, i);
     switch(codec->codec_type){
-    case CODEC_TYPE_VIDEO: put_v(bc, 0); break;
-    case CODEC_TYPE_AUDIO: put_v(bc, 1); break;
-    case CODEC_TYPE_SUBTITLE: put_v(bc, 2); break;
+    case AVMEDIA_TYPE_VIDEO: put_v(bc, 0); break;
+    case AVMEDIA_TYPE_AUDIO: put_v(bc, 1); break;
+    case AVMEDIA_TYPE_SUBTITLE: put_v(bc, 2); break;
     default              : put_v(bc, 3); break;
     }
     put_v(bc, 4);
@@ -415,12 +415,12 @@ static int write_streamheader(NUTContext
     put_buffer(bc, codec->extradata, codec->extradata_size);
 
     switch(codec->codec_type){
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         put_v(bc, codec->sample_rate);
         put_v(bc, 1);
         put_v(bc, codec->channels);
         break;
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         put_v(bc, codec->width);
         put_v(bc, codec->height);
 

Modified: trunk/libavformat/nuv.c
==============================================================================
--- trunk/libavformat/nuv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/nuv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -155,7 +155,7 @@ static int nuv_header(AVFormatContext *s
         vst = av_new_stream(s, ctx->v_id);
         if (!vst)
             return AVERROR(ENOMEM);
-        vst->codec->codec_type = CODEC_TYPE_VIDEO;
+        vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         vst->codec->codec_id = CODEC_ID_NUV;
         vst->codec->width = width;
         vst->codec->height = height;
@@ -171,7 +171,7 @@ static int nuv_header(AVFormatContext *s
         ast = av_new_stream(s, ctx->a_id);
         if (!ast)
             return AVERROR(ENOMEM);
-        ast->codec->codec_type = CODEC_TYPE_AUDIO;
+        ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         ast->codec->codec_id = CODEC_ID_PCM_S16LE;
         ast->codec->channels = 2;
         ast->codec->sample_rate = 44100;

Modified: trunk/libavformat/oggdec.c
==============================================================================
--- trunk/libavformat/oggdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oggdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -612,7 +612,7 @@ static int ogg_read_seek(AVFormatContext
 
     // Try seeking to a keyframe first. If this fails (very possible),
     // av_seek_frame will fall back to ignoring keyframes
-    if (s->streams[stream_index]->codec->codec_type == CODEC_TYPE_VIDEO
+    if (s->streams[stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO
         && !(flags & AVSEEK_FLAG_ANY))
         os->keyframe_seek = 1;
 

Modified: trunk/libavformat/oggenc.c
==============================================================================
--- trunk/libavformat/oggenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oggenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -178,9 +178,9 @@ static int ogg_write_header(AVFormatCont
     int i, j;
     for (i = 0; i < s->nb_streams; i++) {
         AVStream *st = s->streams[i];
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO)
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
             av_set_pts_info(st, 64, 1, st->codec->sample_rate);
-        else if (st->codec->codec_type == CODEC_TYPE_VIDEO)
+        else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
             av_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
         if (st->codec->codec_id != CODEC_ID_VORBIS &&
             st->codec->codec_id != CODEC_ID_THEORA &&

Modified: trunk/libavformat/oggparsedirac.c
==============================================================================
--- trunk/libavformat/oggparsedirac.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oggparsedirac.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -39,7 +39,7 @@ static int dirac_header(AVFormatContext 
     if (ff_dirac_parse_sequence_header(st->codec, &gb, &source) < 0)
         return -1;
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_DIRAC;
     // dirac in ogg always stores timestamps as though the video were interlaced
     st->time_base = (AVRational){st->codec->time_base.num, 2*st->codec->time_base.den};
@@ -77,7 +77,7 @@ static int old_dirac_header(AVFormatCont
     if (buf[0] != 'K')
         return 0;
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_DIRAC;
     st->time_base.den = AV_RB32(buf+8);
     st->time_base.num = AV_RB32(buf+12);

Modified: trunk/libavformat/oggparseflac.c
==============================================================================
--- trunk/libavformat/oggparseflac.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oggparseflac.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -57,7 +57,7 @@ flac_header (AVFormatContext * s, int id
 
         ff_flac_parse_streaminfo(st->codec, &si, streaminfo_start);
 
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = CODEC_ID_FLAC;
 
         st->codec->extradata =
@@ -78,7 +78,7 @@ static int
 old_flac_header (AVFormatContext * s, int idx)
 {
     AVStream *st = s->streams[idx];
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_FLAC;
 
     return 0;

Modified: trunk/libavformat/oggparseogm.c
==============================================================================
--- trunk/libavformat/oggparseogm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oggparseogm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -49,19 +49,19 @@ ogm_header(AVFormatContext *s, int idx)
 
         if(*p == 'v'){
             int tag;
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             p += 8;
             tag = bytestream_get_le32(&p);
             st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, tag);
             st->codec->codec_tag = tag;
         } else if (*p == 't') {
-            st->codec->codec_type = CODEC_TYPE_SUBTITLE;
+            st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
             st->codec->codec_id = CODEC_ID_TEXT;
             p += 12;
         } else {
             uint8_t acid[5];
             int cid;
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             p += 8;
             bytestream_get_buffer(&p, acid, 4);
             acid[4] = 0;
@@ -78,7 +78,7 @@ ogm_header(AVFormatContext *s, int idx)
 
         p += 8;                     /* buffersize + bits_per_sample */
 
-        if(st->codec->codec_type == CODEC_TYPE_VIDEO){
+        if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
             st->codec->width = bytestream_get_le32(&p);
             st->codec->height = bytestream_get_le32(&p);
             st->codec->time_base.den = spu * 10000000;
@@ -117,14 +117,14 @@ ogm_dshow_header(AVFormatContext *s, int
     t = AV_RL32(p + 96);
 
     if(t == 0x05589f80){
-        st->codec->codec_type = CODEC_TYPE_VIDEO;
+        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, AV_RL32(p + 68));
         st->codec->time_base.den = 10000000;
         st->codec->time_base.num = AV_RL64(p + 164);
         st->codec->width = AV_RL32(p + 176);
         st->codec->height = AV_RL32(p + 180);
     } else if(t == 0x05589f81){
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, AV_RL16(p + 124));
         st->codec->channels = AV_RL16(p + 126);
         st->codec->sample_rate = AV_RL32(p + 128);

Modified: trunk/libavformat/oggparseskeleton.c
==============================================================================
--- trunk/libavformat/oggparseskeleton.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oggparseskeleton.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -33,7 +33,7 @@ static int skeleton_header(AVFormatConte
     int target_idx, start_time;
 
     strcpy(st->codec->codec_name, "skeleton");
-    st->codec->codec_type = CODEC_TYPE_DATA;
+    st->codec->codec_type = AVMEDIA_TYPE_DATA;
 
     if (os->psize < 8)
         return -1;

Modified: trunk/libavformat/oggparsespeex.c
==============================================================================
--- trunk/libavformat/oggparsespeex.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oggparsespeex.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -52,7 +52,7 @@ static int speex_header(AVFormatContext 
 
     if (spxp->seq == 0) {
         int frames_per_packet;
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = CODEC_ID_SPEEX;
 
         st->codec->sample_rate = AV_RL32(p + 36);

Modified: trunk/libavformat/oggparsetheora.c
==============================================================================
--- trunk/libavformat/oggparsetheora.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oggparsetheora.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -104,7 +104,7 @@ theora_header (AVFormatContext * s, int 
         thp->gpshift = get_bits(&gb, 5);
         thp->gpmask = (1 << thp->gpshift) - 1;
 
-        st->codec->codec_type = CODEC_TYPE_VIDEO;
+        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         st->codec->codec_id = CODEC_ID_THEORA;
         st->need_parsing = AVSTREAM_PARSE_HEADERS;
 

Modified: trunk/libavformat/oggparsevorbis.c
==============================================================================
--- trunk/libavformat/oggparsevorbis.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oggparsevorbis.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -237,7 +237,7 @@ vorbis_header (AVFormatContext * s, int 
         if (bytestream_get_byte(&p) != 1) /* framing_flag */
             return -1;
 
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = CODEC_ID_VORBIS;
 
         st->time_base.num = 1;

Modified: trunk/libavformat/oma.c
==============================================================================
--- trunk/libavformat/oma.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/oma.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -112,7 +112,7 @@ static int oma_read_header(AVFormatConte
         return AVERROR(ENOMEM);
 
     st->start_time = 0;
-    st->codec->codec_type  = CODEC_TYPE_AUDIO;
+    st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_tag   = buf[32];
     st->codec->codec_id    = ff_codec_get_id(codec_oma_tags, st->codec->codec_tag);
 

Modified: trunk/libavformat/output-example.c
==============================================================================
--- trunk/libavformat/output-example.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/output-example.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -65,7 +65,7 @@ static AVStream *add_audio_stream(AVForm
 
     c = st->codec;
     c->codec_id = codec_id;
-    c->codec_type = CODEC_TYPE_AUDIO;
+    c->codec_type = AVMEDIA_TYPE_AUDIO;
 
     /* put sample parameters */
     c->bit_rate = 64000;
@@ -199,7 +199,7 @@ static AVStream *add_video_stream(AVForm
 
     c = st->codec;
     c->codec_id = codec_id;
-    c->codec_type = CODEC_TYPE_VIDEO;
+    c->codec_type = AVMEDIA_TYPE_VIDEO;
 
     /* put sample parameters */
     c->bit_rate = 400000;

Modified: trunk/libavformat/psxstr.c
==============================================================================
--- trunk/libavformat/psxstr.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/psxstr.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -169,7 +169,7 @@ static int str_read_packet(AVFormatConte
 
                     str->channels[channel].video_stream_index = st->index;
 
-                    st->codec->codec_type = CODEC_TYPE_VIDEO;
+                    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                     st->codec->codec_id   = CODEC_ID_MDEC;
                     st->codec->codec_tag  = 0;  /* no fourcc */
                     st->codec->width      = AV_RL16(&sector[0x28]);
@@ -216,7 +216,7 @@ static int str_read_packet(AVFormatConte
 
                 str->channels[channel].audio_stream_index = st->index;
 
-                st->codec->codec_type  = CODEC_TYPE_AUDIO;
+                st->codec->codec_type  = AVMEDIA_TYPE_AUDIO;
                 st->codec->codec_id    = CODEC_ID_ADPCM_XA;
                 st->codec->codec_tag   = 0;  /* no fourcc */
                 st->codec->channels    = (fmt&1)?2:1;

Modified: trunk/libavformat/pva.c
==============================================================================
--- trunk/libavformat/pva.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/pva.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -45,7 +45,7 @@ static int pva_read_header(AVFormatConte
 
     if (!(st = av_new_stream(s, 0)))
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_MPEG2VIDEO;
     st->need_parsing      = AVSTREAM_PARSE_FULL;
     av_set_pts_info(st, 32, 1, 90000);
@@ -53,7 +53,7 @@ static int pva_read_header(AVFormatConte
 
     if (!(st = av_new_stream(s, 1)))
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id   = CODEC_ID_MP2;
     st->need_parsing      = AVSTREAM_PARSE_FULL;
     av_set_pts_info(st, 33, 1, 90000);

Modified: trunk/libavformat/qcp.c
==============================================================================
--- trunk/libavformat/qcp.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/qcp.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -95,7 +95,7 @@ static int qcp_read_header(AVFormatConte
     s->file_size = get_le32(pb) + 8;
     url_fskip(pb, 8 + 4 + 1 + 1);    // "QLCMfmt " + chunk-size + major-version + minor-version
 
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->channels   = 1;
     get_buffer(pb, buf, 16);
     if (is_qcelp_13k_guid(buf)) {

Modified: trunk/libavformat/r3d.c
==============================================================================
--- trunk/libavformat/r3d.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/r3d.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -56,7 +56,7 @@ static int r3d_read_red1(AVFormatContext
 
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_JPEG2000;
 
     tmp  = get_byte(s->pb); // major version
@@ -89,7 +89,7 @@ static int r3d_read_red1(AVFormatContext
         AVStream *ast = av_new_stream(s, 1);
         if (!ast)
             return AVERROR(ENOMEM);
-        ast->codec->codec_type = CODEC_TYPE_AUDIO;
+        ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         ast->codec->codec_id = CODEC_ID_PCM_S32BE;
         ast->codec->channels = tmp;
         av_set_pts_info(ast, 32, 1, st->time_base.den);

Modified: trunk/libavformat/raw.c
==============================================================================
--- trunk/libavformat/raw.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/raw.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -74,14 +74,14 @@ static int raw_read_header(AVFormatConte
 
         id = s->iformat->value;
         if (id == CODEC_ID_RAWVIDEO) {
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         } else {
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         }
         st->codec->codec_id = id;
 
         switch(st->codec->codec_type) {
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             st->codec->sample_rate = ap->sample_rate;
             if(ap->channels) st->codec->channels = ap->channels;
             else             st->codec->channels = 1;
@@ -90,7 +90,7 @@ static int raw_read_header(AVFormatConte
             st->codec->block_align = st->codec->bits_per_coded_sample*st->codec->channels/8;
             av_set_pts_info(st, 64, 1, st->codec->sample_rate);
             break;
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             if(ap->time_base.num)
                 av_set_pts_info(st, 64, ap->time_base.num, ap->time_base.den);
             else
@@ -253,7 +253,7 @@ static int audio_read_header(AVFormatCon
     AVStream *st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = s->iformat->value;
     st->need_parsing = AVSTREAM_PARSE_FULL;
     /* the parameters will be extracted from the compressed bitstream */
@@ -271,7 +271,7 @@ static int video_read_header(AVFormatCon
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = s->iformat->value;
     st->need_parsing = AVSTREAM_PARSE_FULL;
 
@@ -700,7 +700,7 @@ static int adts_aac_read_header(AVFormat
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = s->iformat->value;
     st->need_parsing = AVSTREAM_PARSE_FULL;
 

Modified: trunk/libavformat/rdt.c
==============================================================================
--- trunk/libavformat/rdt.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rdt.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -546,10 +546,10 @@ static RTPDynamicProtocolHandler ff_rdt_
     .parse_packet     = rdt_parse_packet \
 };
 
-RDT_HANDLER(live_video, "x-pn-multirate-realvideo-live", CODEC_TYPE_VIDEO);
-RDT_HANDLER(live_audio, "x-pn-multirate-realaudio-live", CODEC_TYPE_AUDIO);
-RDT_HANDLER(video,      "x-pn-realvideo",                CODEC_TYPE_VIDEO);
-RDT_HANDLER(audio,      "x-pn-realaudio",                CODEC_TYPE_AUDIO);
+RDT_HANDLER(live_video, "x-pn-multirate-realvideo-live", AVMEDIA_TYPE_VIDEO);
+RDT_HANDLER(live_audio, "x-pn-multirate-realaudio-live", AVMEDIA_TYPE_AUDIO);
+RDT_HANDLER(video,      "x-pn-realvideo",                AVMEDIA_TYPE_VIDEO);
+RDT_HANDLER(audio,      "x-pn-realaudio",                AVMEDIA_TYPE_AUDIO);
 
 void av_register_rdt_dynamic_payload_handlers(void)
 {

Modified: trunk/libavformat/riff.c
==============================================================================
--- trunk/libavformat/riff.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/riff.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -461,7 +461,7 @@ void ff_get_wav_header(ByteIOContext *pb
     int id;
 
     id = get_le16(pb);
-    codec->codec_type = CODEC_TYPE_AUDIO;
+    codec->codec_type = AVMEDIA_TYPE_AUDIO;
     codec->codec_tag = id;
     codec->channels = get_le16(pb);
     codec->sample_rate = get_le32(pb);
@@ -527,8 +527,8 @@ void ff_parse_specific_params(AVCodecCon
     if(stream->frame_size && stream->sample_rate){
         *au_scale=stream->frame_size;
         *au_rate= stream->sample_rate;
-    }else if(stream->codec_type == CODEC_TYPE_VIDEO ||
-             stream->codec_type == CODEC_TYPE_SUBTITLE){
+    }else if(stream->codec_type == AVMEDIA_TYPE_VIDEO ||
+             stream->codec_type == AVMEDIA_TYPE_SUBTITLE){
         *au_scale= stream->time_base.num;
         *au_rate = stream->time_base.den;
     }else{

Modified: trunk/libavformat/rl2.c
==============================================================================
--- trunk/libavformat/rl2.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rl2.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -116,7 +116,7 @@ static av_cold int rl2_read_header(AVFor
     if(!st)
          return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_RL2;
     st->codec->codec_tag = 0;  /* no fourcc */
     st->codec->width = 320;
@@ -145,7 +145,7 @@ static av_cold int rl2_read_header(AVFor
         st = av_new_stream(s, 0);
         if (!st)
             return AVERROR(ENOMEM);
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = CODEC_ID_PCM_U8;
         st->codec->codec_tag = 1;
         st->codec->channels = channels;

Modified: trunk/libavformat/rmdec.c
==============================================================================
--- trunk/libavformat/rmdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rmdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -161,7 +161,7 @@ static int rm_read_audio_stream_info(AVF
             url_fskip(pb, header_size + startpos - url_ftell(pb));
         st->codec->sample_rate = 8000;
         st->codec->channels = 1;
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = CODEC_ID_RA_144;
     } else {
         int flavor, sub_packet_h, coded_framesize, sub_packet_size;
@@ -195,7 +195,7 @@ static int rm_read_audio_stream_info(AVF
             get_str8(pb, buf, sizeof(buf)); /* desc */
             get_str8(pb, buf, sizeof(buf)); /* desc */
         }
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_tag  = AV_RL32(buf);
         st->codec->codec_id   = ff_codec_get_id(rm_codec_tags, st->codec->codec_tag);
         switch (st->codec->codec_id) {
@@ -316,7 +316,7 @@ ff_rm_read_mdpr_codecdata (AVFormatConte
         st->codec->height = get_be16(pb);
         st->codec->time_base.num= 1;
         fps= get_be16(pb);
-        st->codec->codec_type = CODEC_TYPE_VIDEO;
+        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         get_be32(pb);
         fps2= get_be16(pb);
         get_be16(pb);
@@ -479,7 +479,7 @@ static int rm_read_header(AVFormatContex
             st->duration = duration;
             get_str8(pb, buf, sizeof(buf)); /* desc */
             get_str8(pb, buf, sizeof(buf)); /* mimetype */
-            st->codec->codec_type = CODEC_TYPE_DATA;
+            st->codec->codec_type = AVMEDIA_TYPE_DATA;
             st->priv_data = ff_rm_alloc_rmstream();
             if (ff_rm_read_mdpr_codecdata(s, s->pb, st, st->priv_data,
                                           get_be32(pb)) < 0)
@@ -725,11 +725,11 @@ ff_rm_parse_packet (AVFormatContext *s, 
 {
     RMDemuxContext *rm = s->priv_data;
 
-    if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+    if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         rm->current_stream= st->id;
         if(rm_assemble_video_frame(s, pb, rm, ast, pkt, len, seq))
             return -1; //got partial frame
-    } else if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+    } else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
         if ((st->codec->codec_id == CODEC_ID_RA_288) ||
             (st->codec->codec_id == CODEC_ID_COOK) ||
             (st->codec->codec_id == CODEC_ID_ATRAC3) ||
@@ -790,7 +790,7 @@ ff_rm_parse_packet (AVFormatContext *s, 
     pkt->stream_index = st->index;
 
 #if 0
-    if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+    if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
         if(st->codec->codec_id == CODEC_ID_RV20){
             int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1);
             av_log(s, AV_LOG_DEBUG, "%d %"PRId64" %d\n", *timestamp, *timestamp*512LL/25, seq);
@@ -806,7 +806,7 @@ ff_rm_parse_packet (AVFormatContext *s, 
     if (flags & 2)
         pkt->flags |= PKT_FLAG_KEY;
 
-    return st->codec->codec_type == CODEC_TYPE_AUDIO ? rm->audio_pkt_cnt : 0;
+    return st->codec->codec_type == AVMEDIA_TYPE_AUDIO ? rm->audio_pkt_cnt : 0;
 }
 
 int
@@ -932,7 +932,7 @@ static int64_t rm_read_dts(AVFormatConte
             return AV_NOPTS_VALUE;
 
         st = s->streams[stream_index2];
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             h= get_byte(s->pb); len--;
             if(!(h & 0x40)){
                 seq = get_byte(s->pb); len--;

Modified: trunk/libavformat/rmenc.c
==============================================================================
--- trunk/libavformat/rmenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rmenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -141,7 +141,7 @@ static void rv10_write_header(AVFormatCo
 
         stream = &rm->streams[i];
 
-        if (stream->enc->codec_type == CODEC_TYPE_AUDIO) {
+        if (stream->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
             desc = "The Audio Stream";
             mimetype = "audio/x-pn-realaudio";
             codec_data_size = 73;
@@ -177,7 +177,7 @@ static void rv10_write_header(AVFormatCo
         put_str8(s, mimetype);
         put_be32(s, codec_data_size);
 
-        if (stream->enc->codec_type == CODEC_TYPE_AUDIO) {
+        if (stream->enc->codec_type == AVMEDIA_TYPE_AUDIO) {
             int coded_frame_size, fscode, sample_rate;
             sample_rate = stream->enc->sample_rate;
             coded_frame_size = (stream->enc->bit_rate *
@@ -309,7 +309,7 @@ static int rm_write_header(AVFormatConte
         stream->enc = codec;
 
         switch(codec->codec_type) {
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             rm->audio_stream = stream;
             stream->frame_rate = (float)codec->sample_rate / (float)codec->frame_size;
             /* XXX: dummy values */
@@ -317,7 +317,7 @@ static int rm_write_header(AVFormatConte
             stream->nb_packets = 0;
             stream->total_frames = stream->nb_packets;
             break;
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             rm->video_stream = stream;
             stream->frame_rate = (float)codec->time_base.den / (float)codec->time_base.num;
             /* XXX: dummy values */
@@ -408,7 +408,7 @@ static int rm_write_video(AVFormatContex
 static int rm_write_packet(AVFormatContext *s, AVPacket *pkt)
 {
     if (s->streams[pkt->stream_index]->codec->codec_type ==
-        CODEC_TYPE_AUDIO)
+        AVMEDIA_TYPE_AUDIO)
         return rm_write_audio(s, pkt->data, pkt->size, pkt->flags);
     else
         return rm_write_video(s, pkt->data, pkt->size, pkt->flags);

Modified: trunk/libavformat/rpl.c
==============================================================================
--- trunk/libavformat/rpl.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rpl.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -141,7 +141,7 @@ static int rpl_read_header(AVFormatConte
     vst = av_new_stream(s, 0);
     if (!vst)
         return AVERROR(ENOMEM);
-    vst->codec->codec_type      = CODEC_TYPE_VIDEO;
+    vst->codec->codec_type      = AVMEDIA_TYPE_VIDEO;
     vst->codec->codec_tag       = read_line_and_int(pb, &error);  // video format
     vst->codec->width           = read_line_and_int(pb, &error);  // video width
     vst->codec->height          = read_line_and_int(pb, &error);  // video height
@@ -183,7 +183,7 @@ static int rpl_read_header(AVFormatConte
         ast = av_new_stream(s, 0);
         if (!ast)
             return AVERROR(ENOMEM);
-        ast->codec->codec_type      = CODEC_TYPE_AUDIO;
+        ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
         ast->codec->codec_tag       = audio_format;
         ast->codec->sample_rate     = read_line_and_int(pb, &error);  // audio bitrate
         ast->codec->channels        = read_line_and_int(pb, &error);  // number of audio channels
@@ -295,7 +295,7 @@ static int rpl_read_packet(AVFormatConte
         if (url_fseek(pb, index_entry->pos, SEEK_SET) < 0)
             return AVERROR(EIO);
 
-    if (stream->codec->codec_type == CODEC_TYPE_VIDEO &&
+    if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
         stream->codec->codec_tag == 124) {
         // We have to split Escape 124 frames because there are
         // multiple frames per chunk in Escape 124 samples.
@@ -327,7 +327,7 @@ static int rpl_read_packet(AVFormatConte
             return AVERROR(EIO);
         }
 
-        if (stream->codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             // frames_per_chunk should always be one here; the header
             // parsing will warn if it isn't.
             pkt->duration = rpl->frames_per_chunk;

Modified: trunk/libavformat/rtp.c
==============================================================================
--- trunk/libavformat/rtp.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtp.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -35,39 +35,39 @@ static const struct
 {
     int pt;
     const char enc_name[6];
-    enum CodecType codec_type;
+    enum AVMediaType codec_type;
     enum CodecID codec_id;
     int clock_rate;
     int audio_channels;
 } AVRtpPayloadTypes[]=
 {
-  {0, "PCMU",        CODEC_TYPE_AUDIO,   CODEC_ID_PCM_MULAW, 8000, 1},
-  {3, "GSM",         CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
-  {4, "G723",        CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
-  {5, "DVI4",        CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
-  {6, "DVI4",        CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 16000, 1},
-  {7, "LPC",         CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
-  {8, "PCMA",        CODEC_TYPE_AUDIO,   CODEC_ID_PCM_ALAW, 8000, 1},
-  {9, "G722",        CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
-  {10, "L16",        CODEC_TYPE_AUDIO,   CODEC_ID_PCM_S16BE, 44100, 2},
-  {11, "L16",        CODEC_TYPE_AUDIO,   CODEC_ID_PCM_S16BE, 44100, 1},
-  {12, "QCELP",      CODEC_TYPE_AUDIO,   CODEC_ID_QCELP, 8000, 1},
-  {13, "CN",         CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
-  {14, "MPA",        CODEC_TYPE_AUDIO,   CODEC_ID_MP2, -1, -1},
-  {14, "MPA",        CODEC_TYPE_AUDIO,   CODEC_ID_MP3, -1, -1},
-  {15, "G728",       CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
-  {16, "DVI4",       CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 11025, 1},
-  {17, "DVI4",       CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 22050, 1},
-  {18, "G729",       CODEC_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
-  {25, "CelB",       CODEC_TYPE_VIDEO,   CODEC_ID_NONE, 90000, -1},
-  {26, "JPEG",       CODEC_TYPE_VIDEO,   CODEC_ID_MJPEG, 90000, -1},
-  {28, "nv",         CODEC_TYPE_VIDEO,   CODEC_ID_NONE, 90000, -1},
-  {31, "H261",       CODEC_TYPE_VIDEO,   CODEC_ID_H261, 90000, -1},
-  {32, "MPV",        CODEC_TYPE_VIDEO,   CODEC_ID_MPEG1VIDEO, 90000, -1},
-  {32, "MPV",        CODEC_TYPE_VIDEO,   CODEC_ID_MPEG2VIDEO, 90000, -1},
-  {33, "MP2T",       CODEC_TYPE_DATA,    CODEC_ID_MPEG2TS, 90000, -1},
-  {34, "H263",       CODEC_TYPE_VIDEO,   CODEC_ID_H263, 90000, -1},
-  {-1, "",           CODEC_TYPE_UNKNOWN, CODEC_ID_NONE, -1, -1}
+  {0, "PCMU",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_PCM_MULAW, 8000, 1},
+  {3, "GSM",         AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
+  {4, "G723",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
+  {5, "DVI4",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
+  {6, "DVI4",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 16000, 1},
+  {7, "LPC",         AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
+  {8, "PCMA",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_PCM_ALAW, 8000, 1},
+  {9, "G722",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
+  {10, "L16",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_PCM_S16BE, 44100, 2},
+  {11, "L16",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_PCM_S16BE, 44100, 1},
+  {12, "QCELP",      AVMEDIA_TYPE_AUDIO,   CODEC_ID_QCELP, 8000, 1},
+  {13, "CN",         AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
+  {14, "MPA",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_MP2, -1, -1},
+  {14, "MPA",        AVMEDIA_TYPE_AUDIO,   CODEC_ID_MP3, -1, -1},
+  {15, "G728",       AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
+  {16, "DVI4",       AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 11025, 1},
+  {17, "DVI4",       AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 22050, 1},
+  {18, "G729",       AVMEDIA_TYPE_AUDIO,   CODEC_ID_NONE, 8000, 1},
+  {25, "CelB",       AVMEDIA_TYPE_VIDEO,   CODEC_ID_NONE, 90000, -1},
+  {26, "JPEG",       AVMEDIA_TYPE_VIDEO,   CODEC_ID_MJPEG, 90000, -1},
+  {28, "nv",         AVMEDIA_TYPE_VIDEO,   CODEC_ID_NONE, 90000, -1},
+  {31, "H261",       AVMEDIA_TYPE_VIDEO,   CODEC_ID_H261, 90000, -1},
+  {32, "MPV",        AVMEDIA_TYPE_VIDEO,   CODEC_ID_MPEG1VIDEO, 90000, -1},
+  {32, "MPV",        AVMEDIA_TYPE_VIDEO,   CODEC_ID_MPEG2VIDEO, 90000, -1},
+  {33, "MP2T",       AVMEDIA_TYPE_DATA,    CODEC_ID_MPEG2TS, 90000, -1},
+  {34, "H263",       AVMEDIA_TYPE_VIDEO,   CODEC_ID_H263, 90000, -1},
+  {-1, "",           AVMEDIA_TYPE_UNKNOWN, CODEC_ID_NONE, -1, -1}
 };
 
 int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type)
@@ -118,7 +118,7 @@ const char *ff_rtp_enc_name(int payload_
     return "";
 }
 
-enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type)
+enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type)
 {
     int i;
 

Modified: trunk/libavformat/rtp.h
==============================================================================
--- trunk/libavformat/rtp.h	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtp.h	Wed Mar 31 01:30:55 2010	(r22735)
@@ -66,7 +66,7 @@ const char *ff_rtp_enc_name(int payload_
  * @return In case of unknown encoding name, CODEC_ID_NONE is returned;
  * otherwise, the codec id is returned
  */
-enum CodecID ff_rtp_codec_id(const char *buf, enum CodecType codec_type);
+enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type);
 
 #define RTP_PT_PRIVATE 96
 #define RTP_VERSION 2

Modified: trunk/libavformat/rtpdec.c
==============================================================================
--- trunk/libavformat/rtpdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtpdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -51,8 +51,8 @@
 /* statistics functions */
 RTPDynamicProtocolHandler *RTPFirstDynamicPayloadHandler= NULL;
 
-static RTPDynamicProtocolHandler mp4v_es_handler= {"MP4V-ES", CODEC_TYPE_VIDEO, CODEC_ID_MPEG4};
-static RTPDynamicProtocolHandler mpeg4_generic_handler= {"mpeg4-generic", CODEC_TYPE_AUDIO, CODEC_ID_AAC};
+static RTPDynamicProtocolHandler mp4v_es_handler= {"MP4V-ES", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG4};
+static RTPDynamicProtocolHandler mpeg4_generic_handler= {"mpeg4-generic", AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC};
 
 void ff_register_dynamic_payload_handler(RTPDynamicProtocolHandler *handler)
 {
@@ -350,7 +350,7 @@ RTPDemuxContext *rtp_parse_open(AVFormat
             st->need_parsing = AVSTREAM_PARSE_FULL;
             break;
         default:
-            if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+            if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
                 av_set_pts_info(st, 32, 1, st->codec->sample_rate);
             }
             break;

Modified: trunk/libavformat/rtpdec.h
==============================================================================
--- trunk/libavformat/rtpdec.h	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtpdec.h	Wed Mar 31 01:30:55 2010	(r22735)
@@ -132,7 +132,7 @@ typedef int (*DynamicPayloadPacketHandle
 struct RTPDynamicProtocolHandler_s {
     // fields from AVRtpDynamicPayloadType_s
     const char enc_name[50];    /* XXX: still why 50 ? ;-) */
-    enum CodecType codec_type;
+    enum AVMediaType codec_type;
     enum CodecID codec_id;
 
     // may be null

Modified: trunk/libavformat/rtpdec_amr.c
==============================================================================
--- trunk/libavformat/rtpdec_amr.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtpdec_amr.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -170,7 +170,7 @@ static int amr_parse_sdp_line(AVFormatCo
 
 RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = {
     .enc_name         = "AMR",
-    .codec_type       = CODEC_TYPE_AUDIO,
+    .codec_type       = AVMEDIA_TYPE_AUDIO,
     .codec_id         = CODEC_ID_AMR_NB,
     .parse_sdp_a_line = amr_parse_sdp_line,
     .parse_packet     = amr_handle_packet,
@@ -178,7 +178,7 @@ RTPDynamicProtocolHandler ff_amr_nb_dyna
 
 RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = {
     .enc_name         = "AMR-WB",
-    .codec_type       = CODEC_TYPE_AUDIO,
+    .codec_type       = AVMEDIA_TYPE_AUDIO,
     .codec_id         = CODEC_ID_AMR_WB,
     .parse_sdp_a_line = amr_parse_sdp_line,
     .parse_packet     = amr_handle_packet,

Modified: trunk/libavformat/rtpdec_asf.c
==============================================================================
--- trunk/libavformat/rtpdec_asf.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtpdec_asf.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -277,5 +277,5 @@ RTPDynamicProtocolHandler ff_ms_rtp_ ## 
     .parse_packet     = asfrtp_parse_packet,   \
 };
 
-RTP_ASF_HANDLER(asf_pfv, "x-asf-pf",  CODEC_TYPE_VIDEO);
-RTP_ASF_HANDLER(asf_pfa, "x-asf-pf",  CODEC_TYPE_AUDIO);
+RTP_ASF_HANDLER(asf_pfv, "x-asf-pf",  AVMEDIA_TYPE_VIDEO);
+RTP_ASF_HANDLER(asf_pfa, "x-asf-pf",  AVMEDIA_TYPE_AUDIO);

Modified: trunk/libavformat/rtpdec_h263.c
==============================================================================
--- trunk/libavformat/rtpdec_h263.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtpdec_h263.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -94,14 +94,14 @@ static int h263_handle_packet(AVFormatCo
 
 RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
     .enc_name         = "H263-1998",
-    .codec_type       = CODEC_TYPE_VIDEO,
+    .codec_type       = AVMEDIA_TYPE_VIDEO,
     .codec_id         = CODEC_ID_H263,
     .parse_packet     = h263_handle_packet,
 };
 
 RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = {
     .enc_name         = "H263-2000",
-    .codec_type       = CODEC_TYPE_VIDEO,
+    .codec_type       = AVMEDIA_TYPE_VIDEO,
     .codec_id         = CODEC_ID_H263,
     .parse_packet     = h263_handle_packet,
 };

Modified: trunk/libavformat/rtpdec_h264.c
==============================================================================
--- trunk/libavformat/rtpdec_h264.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtpdec_h264.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -411,7 +411,7 @@ This is the structure for expanding on t
 */
 RTPDynamicProtocolHandler ff_h264_dynamic_handler = {
     .enc_name         = "H264",
-    .codec_type       = CODEC_TYPE_VIDEO,
+    .codec_type       = AVMEDIA_TYPE_VIDEO,
     .codec_id         = CODEC_ID_H264,
     .parse_sdp_a_line = parse_h264_sdp_line,
     .open             = h264_new_context,

Modified: trunk/libavformat/rtpdec_theora.c
==============================================================================
--- trunk/libavformat/rtpdec_theora.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtpdec_theora.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -378,7 +378,7 @@ static int theora_parse_sdp_line(AVForma
 
 RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
     .enc_name         = "theora",
-    .codec_type       = CODEC_TYPE_VIDEO,
+    .codec_type       = AVMEDIA_TYPE_VIDEO,
     .codec_id         = CODEC_ID_THEORA,
     .parse_sdp_a_line = theora_parse_sdp_line,
     .open             = theora_new_context,

Modified: trunk/libavformat/rtpdec_vorbis.c
==============================================================================
--- trunk/libavformat/rtpdec_vorbis.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtpdec_vorbis.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -209,7 +209,7 @@ vorbis_handle_packet(AVFormatContext * c
 
 RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
     .enc_name         = "vorbis",
-    .codec_type       = CODEC_TYPE_AUDIO,
+    .codec_type       = AVMEDIA_TYPE_AUDIO,
     .codec_id         = CODEC_ID_VORBIS,
     .parse_sdp_a_line = NULL,
     .open             = vorbis_new_context,

Modified: trunk/libavformat/rtpenc.c
==============================================================================
--- trunk/libavformat/rtpenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtpenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -78,7 +78,7 @@ static int rtp_write_header(AVFormatCont
 
     s->payload_type = ff_rtp_get_payload_type(st->codec);
     if (s->payload_type < 0)
-        s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == CODEC_TYPE_AUDIO);
+        s->payload_type = RTP_PT_PRIVATE + (st->codec->codec_type == AVMEDIA_TYPE_AUDIO);
 
     s->base_timestamp = ff_random_get_seed();
     s->timestamp = s->base_timestamp;
@@ -102,14 +102,14 @@ static int rtp_write_header(AVFormatCont
 
     s->max_frames_per_packet = 0;
     if (s1->max_delay) {
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             if (st->codec->frame_size == 0) {
                 av_log(s1, AV_LOG_ERROR, "Cannot respect max delay: frame size = 0\n");
             } else {
                 s->max_frames_per_packet = av_rescale_rnd(s1->max_delay, st->codec->sample_rate, AV_TIME_BASE * st->codec->frame_size, AV_ROUND_DOWN);
             }
         }
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             /* FIXME: We should round down here... */
             s->max_frames_per_packet = av_rescale_q(s1->max_delay, (AVRational){1, 1000000}, st->codec->time_base);
         }
@@ -151,7 +151,7 @@ static int rtp_write_header(AVFormatCont
     case CODEC_ID_AAC:
         s->num_frames = 0;
     default:
-        if (st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             av_set_pts_info(st, 32, 1, st->codec->sample_rate);
         }
         s->buf_ptr = s->buf;

Modified: trunk/libavformat/rtsp.c
==============================================================================
--- trunk/libavformat/rtsp.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/rtsp.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -141,7 +141,7 @@ static int sdp_parse_rtpmap(AVFormatCont
     get_word_sep(buf, sizeof(buf), "/", &p);
     i = atoi(buf);
     switch (codec->codec_type) {
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         av_log(s, AV_LOG_DEBUG, "audio codec set to: %s\n", c_name);
         codec->sample_rate = RTSP_DEFAULT_AUDIO_SAMPLERATE;
         codec->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS;
@@ -161,7 +161,7 @@ static int sdp_parse_rtpmap(AVFormatCont
         av_log(s, AV_LOG_DEBUG, "audio channels set to: %i\n",
                codec->channels);
         break;
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         av_log(s, AV_LOG_DEBUG, "video codec set to: %s\n", c_name);
         break;
     default:
@@ -343,7 +343,7 @@ static void sdp_parse_line(AVFormatConte
     RTSPState *rt = s->priv_data;
     char buf1[64], st_type[64];
     const char *p;
-    enum CodecType codec_type;
+    enum AVMediaType codec_type;
     int payload_type, i;
     AVStream *st;
     RTSPStream *rtsp_st;
@@ -396,11 +396,11 @@ static void sdp_parse_line(AVFormatConte
         s1->skip_media = 0;
         get_word(st_type, sizeof(st_type), &p);
         if (!strcmp(st_type, "audio")) {
-            codec_type = CODEC_TYPE_AUDIO;
+            codec_type = AVMEDIA_TYPE_AUDIO;
         } else if (!strcmp(st_type, "video")) {
-            codec_type = CODEC_TYPE_VIDEO;
+            codec_type = AVMEDIA_TYPE_VIDEO;
         } else if (!strcmp(st_type, "application")) {
-            codec_type = CODEC_TYPE_DATA;
+            codec_type = AVMEDIA_TYPE_DATA;
         } else {
             s1->skip_media = 1;
             return;
@@ -1181,7 +1181,7 @@ static int make_setup_request(AVFormatCo
              * will return an error. Therefore, we skip those streams. */
             if (rt->server_type == RTSP_SERVER_WMS &&
                 s->streams[rtsp_st->stream_index]->codec->codec_type ==
-                    CODEC_TYPE_DATA)
+                    AVMEDIA_TYPE_DATA)
                 continue;
             snprintf(transport, sizeof(transport) - 1,
                      "%s/TCP;", trans_pref);

Modified: trunk/libavformat/sdp.c
==============================================================================
--- trunk/libavformat/sdp.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/sdp.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -301,13 +301,13 @@ static void sdp_write_media(char *buff, 
 
     payload_type = ff_rtp_get_payload_type(c);
     if (payload_type < 0) {
-        payload_type = RTP_PT_PRIVATE + (c->codec_type == CODEC_TYPE_AUDIO);
+        payload_type = RTP_PT_PRIVATE + (c->codec_type == AVMEDIA_TYPE_AUDIO);
     }
 
     switch (c->codec_type) {
-        case CODEC_TYPE_VIDEO   : type = "video"      ; break;
-        case CODEC_TYPE_AUDIO   : type = "audio"      ; break;
-        case CODEC_TYPE_SUBTITLE: type = "text"       ; break;
+        case AVMEDIA_TYPE_VIDEO   : type = "video"      ; break;
+        case AVMEDIA_TYPE_AUDIO   : type = "audio"      ; break;
+        case AVMEDIA_TYPE_SUBTITLE: type = "text"       ; break;
         default                 : type = "application"; break;
     }
 

Modified: trunk/libavformat/segafilm.c
==============================================================================
--- trunk/libavformat/segafilm.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/segafilm.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -133,7 +133,7 @@ static int film_read_header(AVFormatCont
         if (!st)
             return AVERROR(ENOMEM);
         film->video_stream_index = st->index;
-        st->codec->codec_type = CODEC_TYPE_VIDEO;
+        st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         st->codec->codec_id = film->video_type;
         st->codec->codec_tag = 0;  /* no fourcc */
         st->codec->width = AV_RB32(&scratch[16]);
@@ -145,7 +145,7 @@ static int film_read_header(AVFormatCont
         if (!st)
             return AVERROR(ENOMEM);
         film->audio_stream_index = st->index;
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = film->audio_type;
         st->codec->codec_tag = 1;
         st->codec->channels = film->audio_channels;

Modified: trunk/libavformat/sierravmd.c
==============================================================================
--- trunk/libavformat/sierravmd.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/sierravmd.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -109,7 +109,7 @@ static int vmd_read_header(AVFormatConte
         return AVERROR(ENOMEM);
     av_set_pts_info(vst, 33, 1, 10);
     vmd->video_stream_index = vst->index;
-    vst->codec->codec_type = CODEC_TYPE_VIDEO;
+    vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     vst->codec->codec_id = vmd->is_indeo3 ? CODEC_ID_INDEO3 : CODEC_ID_VMDVIDEO;
     vst->codec->codec_tag = 0;  /* no fourcc */
     vst->codec->width = AV_RL16(&vmd->vmd_header[12]);
@@ -129,7 +129,7 @@ static int vmd_read_header(AVFormatConte
         if (!st)
             return AVERROR(ENOMEM);
         vmd->audio_stream_index = st->index;
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         st->codec->codec_id = CODEC_ID_VMDAUDIO;
         st->codec->codec_tag = 0;  /* no fourcc */
         st->codec->channels = (vmd->vmd_header[811] & 0x80) ? 2 : 1;

Modified: trunk/libavformat/siff.c
==============================================================================
--- trunk/libavformat/siff.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/siff.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -74,7 +74,7 @@ static int create_audio_stream(AVFormatC
     ast = av_new_stream(s, 0);
     if (!ast)
         return -1;
-    ast->codec->codec_type      = CODEC_TYPE_AUDIO;
+    ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
     ast->codec->codec_id        = CODEC_ID_PCM_U8;
     ast->codec->channels        = 1;
     ast->codec->bits_per_coded_sample = c->bits;
@@ -118,7 +118,7 @@ static int siff_parse_vbv1(AVFormatConte
     st = av_new_stream(s, 0);
     if (!st)
         return -1;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id   = CODEC_ID_VB;
     st->codec->codec_tag  = MKTAG('V', 'B', 'V', '1');
     st->codec->width      = width;

Modified: trunk/libavformat/smacker.c
==============================================================================
--- trunk/libavformat/smacker.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/smacker.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -158,7 +158,7 @@ static int smacker_read_header(AVFormatC
     st->codec->width = smk->width;
     st->codec->height = smk->height;
     st->codec->pix_fmt = PIX_FMT_PAL8;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_SMACKVIDEO;
     st->codec->codec_tag = smk->magic;
     /* Smacker uses 100000 as internal timebase */
@@ -176,7 +176,7 @@ static int smacker_read_header(AVFormatC
         if(smk->rates[i] & 0xFFFFFF){
             ast[i] = av_new_stream(s, 0);
             smk->indexes[i] = ast[i]->index;
-            ast[i]->codec->codec_type = CODEC_TYPE_AUDIO;
+            ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             if (smk->rates[i] & SMK_AUD_BINKAUD) {
                 ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_RDFT;
             } else if (smk->rates[i] & SMK_AUD_USEDCT) {

Modified: trunk/libavformat/sol.c
==============================================================================
--- trunk/libavformat/sol.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/sol.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -114,7 +114,7 @@ static int sol_read_header(AVFormatConte
     st = av_new_stream(s, 0);
     if (!st)
         return -1;
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_tag = id;
     st->codec->codec_id = codec;
     st->codec->channels = channels;

Modified: trunk/libavformat/soxdec.c
==============================================================================
--- trunk/libavformat/soxdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/soxdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -53,7 +53,7 @@ static int sox_read_header(AVFormatConte
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
 
     if (get_le32(pb) == SOX_TAG) {
         st->codec->codec_id = CODEC_ID_PCM_S32LE;

Modified: trunk/libavformat/swfdec.c
==============================================================================
--- trunk/libavformat/swfdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/swfdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -97,7 +97,7 @@ static int swf_read_packet(AVFormatConte
 
             for (i=0; i<s->nb_streams; i++) {
                 st = s->streams[i];
-                if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id)
+                if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == ch_id)
                     goto skip;
             }
 
@@ -109,7 +109,7 @@ static int swf_read_packet(AVFormatConte
             vst = av_new_stream(s, ch_id);
             if (!vst)
                 return -1;
-            vst->codec->codec_type = CODEC_TYPE_VIDEO;
+            vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             vst->codec->codec_id = ff_codec_get_id(swf_codec_tags, get_byte(pb));
             av_set_pts_info(vst, 16, 256, swf->frame_rate);
             vst->codec->time_base = (AVRational){ 256, swf->frame_rate };
@@ -120,7 +120,7 @@ static int swf_read_packet(AVFormatConte
 
             for (i=0; i<s->nb_streams; i++) {
                 st = s->streams[i];
-                if (st->codec->codec_type == CODEC_TYPE_AUDIO && st->id == -1)
+                if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1)
                     goto skip;
             }
 
@@ -131,7 +131,7 @@ static int swf_read_packet(AVFormatConte
             if (!ast)
                 return -1;
             ast->codec->channels = 1 + (v&1);
-            ast->codec->codec_type = CODEC_TYPE_AUDIO;
+            ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             ast->codec->codec_id = ff_codec_get_id(swf_audio_codec_tags, (v>>4) & 15);
             ast->need_parsing = AVSTREAM_PARSE_FULL;
             sample_rate_code= (v>>2) & 3;
@@ -145,7 +145,7 @@ static int swf_read_packet(AVFormatConte
             len -= 2;
             for(i=0; i<s->nb_streams; i++) {
                 st = s->streams[i];
-                if (st->codec->codec_type == CODEC_TYPE_VIDEO && st->id == ch_id) {
+                if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->id == ch_id) {
                     frame = get_le16(pb);
                     av_get_packet(pb, pkt, len-2);
                     pkt->pos = pos;
@@ -157,7 +157,7 @@ static int swf_read_packet(AVFormatConte
         } else if (tag == TAG_STREAMBLOCK) {
             for (i = 0; i < s->nb_streams; i++) {
                 st = s->streams[i];
-                if (st->codec->codec_type == CODEC_TYPE_AUDIO && st->id == -1) {
+                if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {
             if (st->codec->codec_id == CODEC_ID_MP3) {
                 url_fskip(pb, 4);
                 av_get_packet(pb, pkt, len-4);
@@ -179,7 +179,7 @@ static int swf_read_packet(AVFormatConte
                 vst = av_new_stream(s, -2); /* -2 to avoid clash with video stream and audio stream */
                 if (!vst)
                     return -1;
-                vst->codec->codec_type = CODEC_TYPE_VIDEO;
+                vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
                 vst->codec->codec_id = CODEC_ID_MJPEG;
                 av_set_pts_info(vst, 64, 256, swf->frame_rate);
                 vst->codec->time_base = (AVRational){ 256, swf->frame_rate };

Modified: trunk/libavformat/swfenc.c
==============================================================================
--- trunk/libavformat/swfenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/swfenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -185,7 +185,7 @@ static int swf_write_header(AVFormatCont
 
     for(i=0;i<s->nb_streams;i++) {
         AVCodecContext *enc = s->streams[i]->codec;
-        if (enc->codec_type == CODEC_TYPE_AUDIO) {
+        if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
             if (enc->codec_id == CODEC_ID_MP3) {
                 if (!enc->frame_size) {
                     av_log(s, AV_LOG_ERROR, "audio frame size not set\n");
@@ -464,7 +464,7 @@ static int swf_write_audio(AVFormatConte
 static int swf_write_packet(AVFormatContext *s, AVPacket *pkt)
 {
     AVCodecContext *codec = s->streams[pkt->stream_index]->codec;
-    if (codec->codec_type == CODEC_TYPE_AUDIO)
+    if (codec->codec_type == AVMEDIA_TYPE_AUDIO)
         return swf_write_audio(s, codec, pkt->data, pkt->size);
     else
         return swf_write_video(s, codec, pkt->data, pkt->size);
@@ -480,7 +480,7 @@ static int swf_write_trailer(AVFormatCon
     video_enc = NULL;
     for(i=0;i<s->nb_streams;i++) {
         enc = s->streams[i]->codec;
-        if (enc->codec_type == CODEC_TYPE_VIDEO)
+        if (enc->codec_type == AVMEDIA_TYPE_VIDEO)
             video_enc = enc;
         else
             av_fifo_free(swf->audio_fifo);

Modified: trunk/libavformat/thp.c
==============================================================================
--- trunk/libavformat/thp.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/thp.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -100,7 +100,7 @@ static int thp_read_header(AVFormatConte
             /* The denominator and numerator are switched because 1/fps
                is required.  */
             av_set_pts_info(st, 64, thp->fps.den, thp->fps.num);
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_id = CODEC_ID_THP;
             st->codec->codec_tag = 0;  /* no fourcc */
             st->codec->width = get_be32(pb);
@@ -120,7 +120,7 @@ static int thp_read_header(AVFormatConte
             if (!st)
                 return AVERROR(ENOMEM);
 
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             st->codec->codec_id = CODEC_ID_ADPCM_THP;
             st->codec->codec_tag = 0;  /* no fourcc */
             st->codec->channels    = get_be32(pb); /* numChannels.  */

Modified: trunk/libavformat/tiertexseq.c
==============================================================================
--- trunk/libavformat/tiertexseq.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/tiertexseq.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -212,7 +212,7 @@ static int seq_read_header(AVFormatConte
 
     av_set_pts_info(st, 32, 1, SEQ_FRAME_RATE);
     seq->video_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO;
     st->codec->codec_tag = 0;  /* no fourcc */
     st->codec->width = SEQ_FRAME_W;
@@ -225,7 +225,7 @@ static int seq_read_header(AVFormatConte
 
     av_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE);
     seq->audio_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_PCM_S16BE;
     st->codec->codec_tag = 0;  /* no tag */
     st->codec->channels = 1;

Modified: trunk/libavformat/tmv.c
==============================================================================
--- trunk/libavformat/tmv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/tmv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -109,7 +109,7 @@ static int tmv_read_header(AVFormatConte
         return -1;
     }
 
-    ast->codec->codec_type            = CODEC_TYPE_AUDIO;
+    ast->codec->codec_type            = AVMEDIA_TYPE_AUDIO;
     ast->codec->codec_id              = CODEC_ID_PCM_U8;
     ast->codec->channels              = features & TMV_STEREO ? 2 : 1;
     ast->codec->bits_per_coded_sample = 8;
@@ -121,7 +121,7 @@ static int tmv_read_header(AVFormatConte
     fps.den = tmv->audio_chunk_size;
     av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL);
 
-    vst->codec->codec_type = CODEC_TYPE_VIDEO;
+    vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     vst->codec->codec_id   = CODEC_ID_TMV;
     vst->codec->pix_fmt    = PIX_FMT_PAL8;
     vst->codec->width      = char_cols * 8;

Modified: trunk/libavformat/tta.c
==============================================================================
--- trunk/libavformat/tta.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/tta.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -101,7 +101,7 @@ static int tta_read_header(AVFormatConte
     }
     url_fskip(s->pb, 4); // seektable crc
 
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_TTA;
     st->codec->channels = channels;
     st->codec->sample_rate = samplerate;

Modified: trunk/libavformat/txd.c
==============================================================================
--- trunk/libavformat/txd.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/txd.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -43,7 +43,7 @@ static int txd_read_header(AVFormatConte
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_TXD;
     st->codec->time_base.den = 5;
     st->codec->time_base.num = 1;

Modified: trunk/libavformat/utils.c
==============================================================================
--- trunk/libavformat/utils.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/utils.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -254,8 +254,8 @@ AVOutputFormat *guess_stream_format(cons
 #endif
 
 enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
-                            const char *filename, const char *mime_type, enum CodecType type){
-    if(type == CODEC_TYPE_VIDEO){
+                            const char *filename, const char *mime_type, enum AVMediaType type){
+    if(type == AVMEDIA_TYPE_VIDEO){
         enum CodecID codec_id= CODEC_ID_NONE;
 
 #if CONFIG_IMAGE2_MUXER
@@ -266,7 +266,7 @@ enum CodecID av_guess_codec(AVOutputForm
         if(codec_id == CODEC_ID_NONE)
             codec_id= fmt->video_codec;
         return codec_id;
-    }else if(type == CODEC_TYPE_AUDIO)
+    }else if(type == AVMEDIA_TYPE_AUDIO)
         return fmt->audio_codec;
     else
         return CODEC_ID_NONE;
@@ -351,25 +351,25 @@ static int set_codec_from_probe_data(AVF
                pd->buf_size, MAX_PROBE_PACKETS - st->probe_packets, fmt->name, score);
         if (!strcmp(fmt->name, "mp3")) {
             st->codec->codec_id = CODEC_ID_MP3;
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         } else if (!strcmp(fmt->name, "ac3")) {
             st->codec->codec_id = CODEC_ID_AC3;
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         } else if (!strcmp(fmt->name, "eac3")) {
             st->codec->codec_id = CODEC_ID_EAC3;
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         } else if (!strcmp(fmt->name, "mpegvideo")) {
             st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         } else if (!strcmp(fmt->name, "m4v")) {
             st->codec->codec_id = CODEC_ID_MPEG4;
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         } else if (!strcmp(fmt->name, "h264")) {
             st->codec->codec_id = CODEC_ID_H264;
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
         } else if (!strcmp(fmt->name, "dts")) {
             st->codec->codec_id = CODEC_ID_DTS;
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         }
     }
     return !!fmt;
@@ -646,13 +646,13 @@ int av_read_packet(AVFormatContext *s, A
         st= s->streams[pkt->stream_index];
 
         switch(st->codec->codec_type){
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             if(s->video_codec_id)   st->codec->codec_id= s->video_codec_id;
             break;
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             if(s->audio_codec_id)   st->codec->codec_id= s->audio_codec_id;
             break;
-        case CODEC_TYPE_SUBTITLE:
+        case AVMEDIA_TYPE_SUBTITLE:
             if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id;
             break;
         }
@@ -729,7 +729,7 @@ static void compute_frame_duration(int *
     *pnum = 0;
     *pden = 0;
     switch(st->codec->codec_type) {
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         if(st->time_base.num*1000LL > st->time_base.den){
             *pnum = st->time_base.num;
             *pden = st->time_base.den;
@@ -741,7 +741,7 @@ static void compute_frame_duration(int *
             }
         }
         break;
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         frame_size = get_audio_frame_size(st->codec, pkt->size);
         if (frame_size < 0)
             break;
@@ -754,9 +754,9 @@ static void compute_frame_duration(int *
 }
 
 static int is_intra_only(AVCodecContext *enc){
-    if(enc->codec_type == CODEC_TYPE_AUDIO){
+    if(enc->codec_type == AVMEDIA_TYPE_AUDIO){
         return 1;
-    }else if(enc->codec_type == CODEC_TYPE_VIDEO){
+    }else if(enc->codec_type == AVMEDIA_TYPE_VIDEO){
         switch(enc->codec_id){
         case CODEC_ID_MJPEG:
         case CODEC_ID_MJPEGB:
@@ -1223,10 +1223,10 @@ int av_find_default_stream_index(AVForma
         return -1;
     for(i = 0; i < s->nb_streams; i++) {
         st = s->streams[i];
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             return i;
         }
-        if (first_audio_index < 0 && st->codec->codec_type == CODEC_TYPE_AUDIO)
+        if (first_audio_index < 0 && st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
             first_audio_index = i;
     }
     return first_audio_index >= 0 ? first_audio_index : 0;
@@ -1953,7 +1953,7 @@ static int has_codec_parameters(AVCodecC
 {
     int val;
     switch(enc->codec_type) {
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         val = enc->sample_rate && enc->channels && enc->sample_fmt != SAMPLE_FMT_NONE;
         if(!enc->frame_size &&
            (enc->codec_id == CODEC_ID_VORBIS ||
@@ -1964,7 +1964,7 @@ static int has_codec_parameters(AVCodecC
             enc->codec_id == CODEC_ID_SPEEX))
             return 0;
         break;
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         val = enc->width && enc->pix_fmt != PIX_FMT_NONE;
         break;
     default:
@@ -1992,12 +1992,12 @@ static int try_decode_frame(AVStream *st
 
     if(!has_codec_parameters(st->codec)){
         switch(st->codec->codec_type) {
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             avcodec_get_frame_defaults(&picture);
             ret = avcodec_decode_video2(st->codec, &picture,
                                         &got_picture, avpkt);
             break;
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             data_size = FFMAX(avpkt->size, AVCODEC_MAX_AUDIO_FRAME_SIZE);
             samples = av_malloc(data_size);
             if (!samples)
@@ -2129,7 +2129,7 @@ int av_find_stream_info(AVFormatContext 
             st->codec->frame_size = 0;
             st->codec->channels = 0;
         }
-        if(st->codec->codec_type == CODEC_TYPE_VIDEO){
+        if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
 /*            if(!st->time_base.num)
                 st->time_base= */
             if(!st->codec->time_base.num)
@@ -2171,7 +2171,7 @@ int av_find_stream_info(AVFormatContext 
                 break;
             /* variable fps and no guess at the real fps */
             if(   tb_unreliable(st->codec) && !(st->r_frame_rate.num && st->avg_frame_rate.num)
-               && duration_count[i]<20 && st->codec->codec_type == CODEC_TYPE_VIDEO)
+               && duration_count[i]<20 && st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
                 break;
             if(st->parser && st->parser->parser->split && !st->codec->extradata)
                 break;
@@ -2243,7 +2243,7 @@ int av_find_stream_info(AVFormatContext 
             if(pkt->dts != AV_NOPTS_VALUE && last != AV_NOPTS_VALUE && duration>0){
                 double dur= duration * av_q2d(st->time_base);
 
-//                if(st->codec->codec_type == CODEC_TYPE_VIDEO)
+//                if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
 //                    av_log(NULL, AV_LOG_ERROR, "%f\n", dur);
                 if(duration_count[index] < 2)
                     memset(duration_error[index], 0, sizeof(*duration_error));
@@ -2293,7 +2293,7 @@ int av_find_stream_info(AVFormatContext 
             av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
                      (st->codec_info_nb_frames-2)*(int64_t)st->time_base.den,
                       codec_info_duration[i]    *(int64_t)st->time_base.num, 60000);
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample)
                 st->codec->codec_tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
 
@@ -2312,7 +2312,7 @@ int av_find_stream_info(AVFormatContext 
 
                 for(j=1; j<MAX_STD_TIMEBASES; j++){
                     double error= duration_error[i][j] * get_std_framerate(j);
-//                    if(st->codec->codec_type == CODEC_TYPE_VIDEO)
+//                    if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
 //                        av_log(NULL, AV_LOG_ERROR, "%f %f\n", get_std_framerate(j) / 12.0/1001, error);
                     if(error < best_error){
                         best_error= error;
@@ -2334,7 +2334,7 @@ int av_find_stream_info(AVFormatContext 
                     st->r_frame_rate.den = st->time_base.num;
                 }
             }
-        }else if(st->codec->codec_type == CODEC_TYPE_AUDIO) {
+        }else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             if(!st->codec->bits_per_coded_sample)
                 st->codec->bits_per_coded_sample= av_get_bits_per_sample(st->codec->codec_id);
         }
@@ -2348,7 +2348,7 @@ int av_find_stream_info(AVFormatContext 
     /* correct DTS for B-frame streams with no timestamps */
     for(i=0;i<ic->nb_streams;i++) {
         st = ic->streams[i];
-        if (st->codec->codec_type == CODEC_TYPE_VIDEO) {
+        if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
             if(b-frames){
                 ppktl = &ic->packet_buffer;
                 while(ppkt1){
@@ -2581,7 +2581,7 @@ int av_write_header(AVFormatContext *s)
         st = s->streams[i];
 
         switch (st->codec->codec_type) {
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             if(st->codec->sample_rate<=0){
                 av_log(s, AV_LOG_ERROR, "sample rate not set\n");
                 return -1;
@@ -2590,7 +2590,7 @@ int av_write_header(AVFormatContext *s)
                 st->codec->block_align = st->codec->channels *
                     av_get_bits_per_sample(st->codec->codec_id) >> 3;
             break;
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             if(st->codec->time_base.num<=0 || st->codec->time_base.den<=0){ //FIXME audio too?
                 av_log(s, AV_LOG_ERROR, "time base not set\n");
                 return -1;
@@ -2658,10 +2658,10 @@ int av_write_header(AVFormatContext *s)
         st = s->streams[i];
 
         switch (st->codec->codec_type) {
-        case CODEC_TYPE_AUDIO:
+        case AVMEDIA_TYPE_AUDIO:
             den = (int64_t)st->time_base.num * st->codec->sample_rate;
             break;
-        case CODEC_TYPE_VIDEO:
+        case AVMEDIA_TYPE_VIDEO:
             den = (int64_t)st->time_base.num * st->codec->time_base.den;
             break;
         default:
@@ -2732,7 +2732,7 @@ static int compute_pkt_fields2(AVFormatC
 
     /* update pts */
     switch (st->codec->codec_type) {
-    case CODEC_TYPE_AUDIO:
+    case AVMEDIA_TYPE_AUDIO:
         frame_size = get_audio_frame_size(st->codec, pkt->size);
 
         /* HACK/FIXME, we skip the initial 0 size packets as they are most
@@ -2742,7 +2742,7 @@ static int compute_pkt_fields2(AVFormatC
             av_frac_add(&st->pts, (int64_t)st->time_base.den * frame_size);
         }
         break;
-    case CODEC_TYPE_VIDEO:
+    case AVMEDIA_TYPE_VIDEO:
         av_frac_add(&st->pts, (int64_t)st->time_base.den * st->codec->time_base.num);
         break;
     default:
@@ -2859,7 +2859,7 @@ int av_interleaved_write_frame(AVFormatC
     AVStream *st= s->streams[ pkt->stream_index];
 
     //FIXME/XXX/HACK drop zero sized packets
-    if(st->codec->codec_type == CODEC_TYPE_AUDIO && pkt->size==0)
+    if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && pkt->size==0)
         return 0;
 
 //av_log(NULL, AV_LOG_DEBUG, "av_interleaved_write_frame %d %"PRId64" %"PRId64"\n", pkt->size, pkt->dts, pkt->pts);
@@ -2999,7 +2999,7 @@ static void dump_stream_format(AVFormatC
                  st->sample_aspect_ratio.num, st->sample_aspect_ratio.den,
                  display_aspect_ratio.num, display_aspect_ratio.den);
     }
-    if(st->codec->codec_type == CODEC_TYPE_VIDEO){
+    if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO){
         if(st->avg_frame_rate.den && st->avg_frame_rate.num)
             print_fps(av_q2d(st->avg_frame_rate), "fps");
         if(st->r_frame_rate.den && st->r_frame_rate.num)

Modified: trunk/libavformat/vc1test.c
==============================================================================
--- trunk/libavformat/vc1test.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/vc1test.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -58,7 +58,7 @@ static int vc1t_read_header(AVFormatCont
     if (!st)
         return -1;
 
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_WMV3;
 
     st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE);

Modified: trunk/libavformat/vocdec.c
==============================================================================
--- trunk/libavformat/vocdec.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/vocdec.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -54,7 +54,7 @@ static int voc_read_header(AVFormatConte
     st = av_new_stream(s, 0);
     if (!st)
         return AVERROR(ENOMEM);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
 
     voc->remaining_size = 0;
     return 0;

Modified: trunk/libavformat/vocenc.c
==============================================================================
--- trunk/libavformat/vocenc.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/vocenc.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -33,7 +33,7 @@ static int voc_write_header(AVFormatCont
     const int version = 0x0114;
 
     if (s->nb_streams != 1
-        || s->streams[0]->codec->codec_type != CODEC_TYPE_AUDIO)
+        || s->streams[0]->codec->codec_type != AVMEDIA_TYPE_AUDIO)
         return AVERROR_PATCHWELCOME;
 
     put_buffer(pb, ff_voc_magic, sizeof(ff_voc_magic) - 1);

Modified: trunk/libavformat/vqf.c
==============================================================================
--- trunk/libavformat/vqf.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/vqf.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -76,7 +76,7 @@ static int vqf_read_header(AVFormatConte
 
     header_size = get_be32(s->pb);
 
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id   = CODEC_ID_TWINVQ;
     st->start_time = 0;
 

Modified: trunk/libavformat/wc3movie.c
==============================================================================
--- trunk/libavformat/wc3movie.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/wc3movie.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -243,7 +243,7 @@ static int wc3_read_header(AVFormatConte
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
     wc3->video_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_XAN_WC3;
     st->codec->codec_tag = 0;  /* no fourcc */
     st->codec->width = wc3->width;
@@ -257,7 +257,7 @@ static int wc3_read_header(AVFormatConte
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
     wc3->audio_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_PCM_S16LE;
     st->codec->codec_tag = 1;
     st->codec->channels = WC3_AUDIO_CHANNELS;

Modified: trunk/libavformat/westwood.c
==============================================================================
--- trunk/libavformat/westwood.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/westwood.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -148,7 +148,7 @@ static int wsaud_read_header(AVFormatCon
     if (!st)
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, wsaud->audio_samplerate);
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = wsaud->audio_type;
     st->codec->codec_tag = 0;  /* no tag */
     st->codec->channels = wsaud->audio_channels;
@@ -226,7 +226,7 @@ static int wsvqa_read_header(AVFormatCon
         return AVERROR(ENOMEM);
     av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
     wsvqa->video_stream_index = st->index;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_WS_VQA;
     st->codec->codec_tag = 0;  /* no fourcc */
 
@@ -251,7 +251,7 @@ static int wsvqa_read_header(AVFormatCon
         if (!st)
             return AVERROR(ENOMEM);
         av_set_pts_info(st, 33, 1, VQA_FRAMERATE);
-        st->codec->codec_type = CODEC_TYPE_AUDIO;
+        st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
         if (AV_RL16(&header[0]) == 1)
             st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;
         else

Modified: trunk/libavformat/wv.c
==============================================================================
--- trunk/libavformat/wv.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/wv.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -162,7 +162,7 @@ static int wv_read_header(AVFormatContex
     st = av_new_stream(s, 0);
     if (!st)
         return -1;
-    st->codec->codec_type = CODEC_TYPE_AUDIO;
+    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id = CODEC_ID_WAVPACK;
     st->codec->channels = wc->chan;
     st->codec->sample_rate = wc->rate;

Modified: trunk/libavformat/xa.c
==============================================================================
--- trunk/libavformat/xa.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/xa.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -74,7 +74,7 @@ static int xa_read_header(AVFormatContex
     if (!st)
         return AVERROR(ENOMEM);
 
-    st->codec->codec_type   = CODEC_TYPE_AUDIO;
+    st->codec->codec_type   = AVMEDIA_TYPE_AUDIO;
     st->codec->codec_id     = CODEC_ID_ADPCM_EA_MAXIS_XA;
     url_fskip(pb, 4);       /* Skip the XA ID */
     xa->out_size            =  get_le32(pb);

Modified: trunk/libavformat/yop.c
==============================================================================
--- trunk/libavformat/yop.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/yop.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -71,14 +71,14 @@ static int yop_read_header(AVFormatConte
 
     // Audio
     audio_dec               = audio_stream->codec;
-    audio_dec->codec_type   = CODEC_TYPE_AUDIO;
+    audio_dec->codec_type   = AVMEDIA_TYPE_AUDIO;
     audio_dec->codec_id     = CODEC_ID_ADPCM_IMA_WS;
     audio_dec->channels     = 1;
     audio_dec->sample_rate  = 22050;
 
     // Video
     video_dec               = video_stream->codec;
-    video_dec->codec_type   = CODEC_TYPE_VIDEO;
+    video_dec->codec_type   = AVMEDIA_TYPE_VIDEO;
     video_dec->codec_id     = CODEC_ID_YOP;
 
     url_fskip(pb, 6);

Modified: trunk/libavformat/yuv4mpeg.c
==============================================================================
--- trunk/libavformat/yuv4mpeg.c	Wed Mar 31 00:09:14 2010	(r22734)
+++ trunk/libavformat/yuv4mpeg.c	Wed Mar 31 01:30:55 2010	(r22735)
@@ -335,7 +335,7 @@ static int yuv4_read_header(AVFormatCont
     av_reduce(&raten, &rated, raten, rated, (1UL<<31)-1);
     av_set_pts_info(st, 64, rated, raten);
     st->codec->pix_fmt = pix_fmt;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
     st->codec->codec_id = CODEC_ID_RAWVIDEO;
     st->sample_aspect_ratio= (AVRational){aspectn, aspectd};
     st->codec->chroma_sample_location = chroma_sample_location;



More information about the ffmpeg-cvslog mailing list