Mercurial > libavformat.hg
diff mov.c @ 85:25062c9b1f86 libavformat
per context frame_rate_base, this should finally fix frame_rate related av sync issues
author | michaelni |
---|---|
date | Wed, 12 Mar 2003 15:16:19 +0000 |
parents | a58a8a53eb46 |
children | 0865b0aaa2af |
line wrap: on
line diff
--- a/mov.c Wed Mar 12 01:35:47 2003 +0000 +++ b/mov.c Wed Mar 12 15:16:19 2003 +0000 @@ -686,7 +686,8 @@ 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 @@ 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