summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-02-11 21:11:19 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-02-11 21:11:19 +0000
commit5b4f5e5dff771de655556931fcfba50c31a545f7 (patch)
tree1e480ee4559a7a7ee6627ab5409b87c9100b2fc6
parentfcdd622cfc087589f23c0f28a752e375b7c4aa64 (diff)
fix frame size, time rate is not stts duration anymore with time offset
Originally committed as revision 17162 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mov.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5f1d685700..e40abcaf8d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1366,8 +1366,11 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
av_set_pts_info(st, 64, sc->time_rate, sc->time_scale);
if (st->codec->codec_type == CODEC_TYPE_AUDIO &&
- !st->codec->frame_size && sc->stts_count == 1)
- st->codec->frame_size = av_rescale(sc->time_rate, st->codec->sample_rate, sc->time_scale);
+ !st->codec->frame_size && sc->stts_count == 1) {
+ st->codec->frame_size = av_rescale(sc->stts_data[0].duration,
+ st->codec->sample_rate, sc->time_scale);
+ dprintf(c->fc, "frame size %d\n", st->codec->frame_size);
+ }
if(st->duration != AV_NOPTS_VALUE){
assert(st->duration % sc->time_rate == 0);