summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-27 12:35:22 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-27 12:35:22 +0000
commitd3bc61ac758667568c36654e9b8de946f8e665ff (patch)
tree9da36d0e14d19a36c49484bda8c0db9f45cde9eb /libavformat/mov.c
parente9c192562f9e5e5e43241f748168f9726922e605 (diff)
Only use chunk demuxing for old uncompressed audio mechanism specified by stts.
This will split amr/aac cbr samples correctly in isom files which do not set audio cid to -2. Originally committed as revision 12603 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 92957a5100..dfd382a098 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1120,8 +1120,9 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
unsigned int stss_index = 0;
unsigned int i, j;
- if (sc->sample_sizes || st->codec->codec_type == CODEC_TYPE_VIDEO ||
- sc->audio_cid == -2) {
+ /* only use old uncompressed audio chunk demuxing when stts specifies it */
+ if (!(st->codec->codec_type == CODEC_TYPE_AUDIO &&
+ sc->stts_count == 1 && sc->stts_data[0].duration == 1)) {
unsigned int current_sample = 0;
unsigned int stts_sample = 0;
unsigned int keyframe, sample_size;