comparison img2.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 b5d74258cd23
children 11bb10c37225
comparison
equal deleted inserted replaced
5909:b8041f85c327 5910:536e5527c1e0
231 st->start_time = 0; 231 st->start_time = 0;
232 st->duration = last_index - first_index + 1; 232 st->duration = last_index - first_index + 1;
233 } 233 }
234 234
235 if(s1->video_codec_id){ 235 if(s1->video_codec_id){
236 st->codec->codec_type = CODEC_TYPE_VIDEO; 236 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
237 st->codec->codec_id = s1->video_codec_id; 237 st->codec->codec_id = s1->video_codec_id;
238 }else if(s1->audio_codec_id){ 238 }else if(s1->audio_codec_id){
239 st->codec->codec_type = CODEC_TYPE_AUDIO; 239 st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
240 st->codec->codec_id = s1->audio_codec_id; 240 st->codec->codec_id = s1->audio_codec_id;
241 }else{ 241 }else{
242 st->codec->codec_type = CODEC_TYPE_VIDEO; 242 st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
243 st->codec->codec_id = av_str2id(img_tags, s->path); 243 st->codec->codec_id = av_str2id(img_tags, s->path);
244 } 244 }
245 if(st->codec->codec_type == CODEC_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE) 245 if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE)
246 st->codec->pix_fmt = ap->pix_fmt; 246 st->codec->pix_fmt = ap->pix_fmt;
247 247
248 return 0; 248 return 0;
249 } 249 }
250 250