Mercurial > libavformat.hg
comparison segafilm.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 | 49c1d3b27727 |
children | 178de7695c6c |
comparison
equal
deleted
inserted
replaced
5909:b8041f85c327 | 5910:536e5527c1e0 |
---|---|
131 if (film->video_type) { | 131 if (film->video_type) { |
132 st = av_new_stream(s, 0); | 132 st = av_new_stream(s, 0); |
133 if (!st) | 133 if (!st) |
134 return AVERROR(ENOMEM); | 134 return AVERROR(ENOMEM); |
135 film->video_stream_index = st->index; | 135 film->video_stream_index = st->index; |
136 st->codec->codec_type = CODEC_TYPE_VIDEO; | 136 st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
137 st->codec->codec_id = film->video_type; | 137 st->codec->codec_id = film->video_type; |
138 st->codec->codec_tag = 0; /* no fourcc */ | 138 st->codec->codec_tag = 0; /* no fourcc */ |
139 st->codec->width = AV_RB32(&scratch[16]); | 139 st->codec->width = AV_RB32(&scratch[16]); |
140 st->codec->height = AV_RB32(&scratch[12]); | 140 st->codec->height = AV_RB32(&scratch[12]); |
141 } | 141 } |
143 if (film->audio_type) { | 143 if (film->audio_type) { |
144 st = av_new_stream(s, 0); | 144 st = av_new_stream(s, 0); |
145 if (!st) | 145 if (!st) |
146 return AVERROR(ENOMEM); | 146 return AVERROR(ENOMEM); |
147 film->audio_stream_index = st->index; | 147 film->audio_stream_index = st->index; |
148 st->codec->codec_type = CODEC_TYPE_AUDIO; | 148 st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
149 st->codec->codec_id = film->audio_type; | 149 st->codec->codec_id = film->audio_type; |
150 st->codec->codec_tag = 1; | 150 st->codec->codec_tag = 1; |
151 st->codec->channels = film->audio_channels; | 151 st->codec->channels = film->audio_channels; |
152 st->codec->bits_per_coded_sample = film->audio_bits; | 152 st->codec->bits_per_coded_sample = film->audio_bits; |
153 st->codec->sample_rate = film->audio_samplerate; | 153 st->codec->sample_rate = film->audio_samplerate; |