summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2011-01-11 19:58:00 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2011-01-11 19:58:00 +0000
commitf6253caf8b4bcc36fbea8ccaf627edb4093a2c4b (patch)
treefb21b53a54d17faef42958eef8e9afe292f15bf2
parente048a9cab10f1d41dca7b1ad9c8ecaceb3424d86 (diff)
downloadffmpeg-f6253caf8b4bcc36fbea8ccaf627edb4093a2c4b.tar.gz
In mov demuxer, set r_frame_rate for cfr files
Originally committed as revision 26310 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mov.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b602221724..44e744312d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1788,6 +1788,10 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
av_reduce(&st->avg_frame_rate.num, &st->avg_frame_rate.den,
sc->time_scale*st->nb_frames, st->duration, INT_MAX);
+
+ if (sc->stts_count == 1 || (sc->stts_count == 2 && sc->stts_data[1].count == 1))
+ av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den,
+ sc->time_scale, sc->stts_data[0].duration, INT_MAX);
}
switch (st->codec->codec_id) {