changeset 3178:73b7ef886091 libavformat

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.
author bcoudurier
date Thu, 27 Mar 2008 12:35:22 +0000
parents f5ee8f2afc83
children 5f56b694f9bf
files mov.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Thu Mar 27 01:18:16 2008 +0000
+++ b/mov.c	Thu Mar 27 12:35:22 2008 +0000
@@ -1120,8 +1120,9 @@
     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;