diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-03-12 15:16:19 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-03-12 15:16:19 +0000 |
commit | 14bea432f16d7c66f9099e427819028b6b4c3bdc (patch) | |
tree | c52726ce14a0265337b9deebd2214e2552d284b0 /libavformat/mov.c | |
parent | 586bc7553ca90dee507afd950de64bbd2c6a80b5 (diff) | |
download | ffmpeg-14bea432f16d7c66f9099e427819028b6b4c3bdc.tar.gz |
per context frame_rate_base, this should finally fix frame_rate related av sync issues
Originally committed as revision 1666 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 0e43c54c4f..fe99673fa3 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -686,7 +686,8 @@ static int parse_stsd(const MOVParseTableEntry *parse_table, ByteIOContext *pb, get_be16(pb); /* depth */ get_be16(pb); /* colortable id */ - st->codec.frame_rate = 25 * FRAME_RATE_BASE; + st->codec.frame_rate = 25; + st->codec.frame_rate_base = 1; size -= (16+8*4+2+32+2*2); while (size >= 8) { @@ -932,9 +933,8 @@ printf("track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries); sample_duration = get_be32(pb); if (!i && st->codec.codec_type==CODEC_TYPE_VIDEO) { - st->codec.frame_rate = FRAME_RATE_BASE * c->streams[c->total_streams]->time_scale; - if (sample_duration) - st->codec.frame_rate /= sample_duration; + st->codec.frame_rate_base = sample_duration ? sample_duration : 1; + st->codec.frame_rate = c->streams[c->total_streams]->time_scale; #ifdef DEBUG printf("VIDEO FRAME RATE= %i (sd= %i)\n", st->codec.frame_rate, sample_duration); #endif |