comparison utils.c @ 5356:ed7d84e0164d libavcodec

set codec_type on init
author alex
date Tue, 17 Jul 2007 13:35:16 +0000
parents 6661692d34b4
children 7f96f6e16f81
comparison
equal deleted inserted replaced
5355:45d083bbbbe7 5356:ed7d84e0164d
757 int flags=0; 757 int flags=0;
758 memset(s, 0, sizeof(AVCodecContext)); 758 memset(s, 0, sizeof(AVCodecContext));
759 759
760 s->av_class= &av_codec_context_class; 760 s->av_class= &av_codec_context_class;
761 761
762 s->codec_type = codec_type;
762 if(codec_type == CODEC_TYPE_AUDIO) 763 if(codec_type == CODEC_TYPE_AUDIO)
763 flags= AV_OPT_FLAG_AUDIO_PARAM; 764 flags= AV_OPT_FLAG_AUDIO_PARAM;
764 else if(codec_type == CODEC_TYPE_VIDEO) 765 else if(codec_type == CODEC_TYPE_VIDEO)
765 flags= AV_OPT_FLAG_VIDEO_PARAM; 766 flags= AV_OPT_FLAG_VIDEO_PARAM;
766 else if(codec_type == CODEC_TYPE_SUBTITLE) 767 else if(codec_type == CODEC_TYPE_SUBTITLE)