diff flvdec.c @ 5910:536e5527c1e0 libavformat

Define AVMediaType enum, and use it instead of enum CodecType, which is deprecated and will be dropped at the next major bump.
author stefano
date Tue, 30 Mar 2010 23:30:55 +0000
parents 2db4e4b04157
children 11bb10c37225
line wrap: on
line diff
--- a/flvdec.c	Tue Mar 30 15:50:57 2010 +0000
+++ b/flvdec.c	Tue Mar 30 23:30:55 2010 +0000
@@ -221,8 +221,8 @@
     //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 @@
     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;
 }