Mercurial > libavformat.hg
comparison segafilm.c @ 820:feca73904e67 libavformat
changing AVCodecContext codec -> *codec in AVStream so additions to AVCodecContext dont randomize AVStream and break binary compatibility
author | michael |
---|---|
date | Sun, 17 Jul 2005 22:24:36 +0000 |
parents | c5077fdab490 |
children | da1d5db0ce5c |
comparison
equal
deleted
inserted
replaced
819:a6c035e7f429 | 820:feca73904e67 |
---|---|
138 if (film->video_type) { | 138 if (film->video_type) { |
139 st = av_new_stream(s, 0); | 139 st = av_new_stream(s, 0); |
140 if (!st) | 140 if (!st) |
141 return AVERROR_NOMEM; | 141 return AVERROR_NOMEM; |
142 film->video_stream_index = st->index; | 142 film->video_stream_index = st->index; |
143 st->codec.codec_type = CODEC_TYPE_VIDEO; | 143 st->codec->codec_type = CODEC_TYPE_VIDEO; |
144 st->codec.codec_id = film->video_type; | 144 st->codec->codec_id = film->video_type; |
145 st->codec.codec_tag = 0; /* no fourcc */ | 145 st->codec->codec_tag = 0; /* no fourcc */ |
146 st->codec.width = BE_32(&scratch[16]); | 146 st->codec->width = BE_32(&scratch[16]); |
147 st->codec.height = BE_32(&scratch[12]); | 147 st->codec->height = BE_32(&scratch[12]); |
148 } | 148 } |
149 | 149 |
150 if (film->audio_type) { | 150 if (film->audio_type) { |
151 st = av_new_stream(s, 0); | 151 st = av_new_stream(s, 0); |
152 if (!st) | 152 if (!st) |
153 return AVERROR_NOMEM; | 153 return AVERROR_NOMEM; |
154 film->audio_stream_index = st->index; | 154 film->audio_stream_index = st->index; |
155 st->codec.codec_type = CODEC_TYPE_AUDIO; | 155 st->codec->codec_type = CODEC_TYPE_AUDIO; |
156 st->codec.codec_id = film->audio_type; | 156 st->codec->codec_id = film->audio_type; |
157 st->codec.codec_tag = 1; | 157 st->codec->codec_tag = 1; |
158 st->codec.channels = film->audio_channels; | 158 st->codec->channels = film->audio_channels; |
159 st->codec.bits_per_sample = film->audio_bits; | 159 st->codec->bits_per_sample = film->audio_bits; |
160 st->codec.sample_rate = film->audio_samplerate; | 160 st->codec->sample_rate = film->audio_samplerate; |
161 st->codec.bit_rate = st->codec.channels * st->codec.sample_rate * | 161 st->codec->bit_rate = st->codec->channels * st->codec->sample_rate * |
162 st->codec.bits_per_sample; | 162 st->codec->bits_per_sample; |
163 st->codec.block_align = st->codec.channels * | 163 st->codec->block_align = st->codec->channels * |
164 st->codec.bits_per_sample / 8; | 164 st->codec->bits_per_sample / 8; |
165 } | 165 } |
166 | 166 |
167 /* load the sample table */ | 167 /* load the sample table */ |
168 if (get_buffer(pb, scratch, 16) != 16) | 168 if (get_buffer(pb, scratch, 16) != 16) |
169 return AVERROR_IO; | 169 return AVERROR_IO; |