Mercurial > libavformat.hg
comparison avidec.c @ 743:af4e24d6310c libavformat
switch to native time bases
author | michael |
---|---|
date | Sat, 30 Apr 2005 21:43:59 +0000 |
parents | ff85dfd59176 |
children | cdb845a57ae4 |
comparison
equal
deleted
inserted
replaced
742:21c1ae78f041 | 743:af4e24d6310c |
---|---|
219 | 219 |
220 ast->start= get_le32(pb); /* start */ | 220 ast->start= get_le32(pb); /* start */ |
221 nb_frames = get_le32(pb); | 221 nb_frames = get_le32(pb); |
222 | 222 |
223 st->start_time = 0; | 223 st->start_time = 0; |
224 st->duration = av_rescale(nb_frames, ast->scale*(int64_t)AV_TIME_BASE, ast->rate); | 224 st->duration = nb_frames; |
225 get_le32(pb); /* buffer size */ | 225 get_le32(pb); /* buffer size */ |
226 get_le32(pb); /* quality */ | 226 get_le32(pb); /* quality */ |
227 ast->sample_size = get_le32(pb); /* sample ssize */ | 227 ast->sample_size = get_le32(pb); /* sample ssize */ |
228 // av_log(NULL, AV_LOG_DEBUG, "%d %d %d %d\n", ast->rate, ast->scale, ast->start, ast->sample_size); | 228 // av_log(NULL, AV_LOG_DEBUG, "%d %d %d %d\n", ast->rate, ast->scale, ast->start, ast->sample_size); |
229 | 229 |
230 switch(tag1) { | 230 switch(tag1) { |
231 case MKTAG('v', 'i', 'd', 's'): | 231 case MKTAG('v', 'i', 'd', 's'): |
232 codec_type = CODEC_TYPE_VIDEO; | 232 codec_type = CODEC_TYPE_VIDEO; |
233 | 233 |
234 ast->sample_size = 0; | 234 ast->sample_size = 0; |
235 st->codec.frame_rate = ast->rate; | |
236 st->codec.frame_rate_base = ast->scale; | |
237 break; | 235 break; |
238 case MKTAG('a', 'u', 'd', 's'): | 236 case MKTAG('a', 'u', 'd', 's'): |
239 codec_type = CODEC_TYPE_AUDIO; | 237 codec_type = CODEC_TYPE_AUDIO; |
240 break; | 238 break; |
241 case MKTAG('t', 'x', 't', 's'): | 239 case MKTAG('t', 'x', 't', 's'): |