diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-03-21 10:17:52 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2007-03-21 10:17:52 +0000 |
commit | 2d2432b73852900498b3ceb20655990f0c8e13c5 (patch) | |
tree | d0cbf8fb51fdf03532abf545b95d7d81b53ba126 | |
parent | 4278662d45d3210e497a152f3cab982d76a6e9dc (diff) | |
download | ffmpeg-2d2432b73852900498b3ceb20655990f0c8e13c5.tar.gz |
set audio frame size based on stts
Originally committed as revision 8462 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 63a9e75194..f41c53e314 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1502,6 +1502,7 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap) for(i=0; i<mov->total_streams; i++) { MOVStreamContext *sc = mov->streams[i]; + AVStream *st = s->streams[i]; /* sanity checks */ if(!sc->stts_count || !sc->chunk_count || !sc->sample_to_chunk_sz || (!sc->sample_size && !sc->sample_count)){ @@ -1514,6 +1515,9 @@ static int mov_read_header(AVFormatContext *s, AVFormatParameters *ap) sc->time_scale= mov->time_scale; av_set_pts_info(s->streams[i], 64, sc->time_rate, sc->time_scale); + if (st->codec->codec_type == CODEC_TYPE_AUDIO && sc->stts_count == 1) + st->codec->frame_size = sc->stts_data[0].duration; + if(s->streams[i]->duration != AV_NOPTS_VALUE){ assert(s->streams[i]->duration % sc->time_rate == 0); s->streams[i]->duration /= sc->time_rate; |