summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-02-11 22:23:05 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-02-11 22:23:05 +0000
commit77c7543702309ff7530ab7b4ba5adac8db103ca6 (patch)
tree7719e7933a365d898a455b6eeffc261db5db6e56 /libavformat/mov.c
parent22ed53e5f45b60db90e683f3b4ae9aec17c9f3fc (diff)
use correct demux mechanism when audio compression id is -2, dv audio does not matter, demux partially qt_dv_pal_test.mov which does NOT use cid -2
Originally committed as revision 11908 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index e3749ef573..e2272b1bc1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -108,6 +108,7 @@ typedef struct MOVStreamContext {
unsigned int samples_per_frame;
int dv_audio_container;
int pseudo_stream_id;
+ int16_t audio_cid; ///< stsd audio compression id
} MOVStreamContext;
typedef struct MOVContext {
@@ -743,7 +744,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
/* do we need to force to 16 for AMR ? */
/* handle specific s8 codec */
- get_be16(pb); /* compression id = 0*/
+ sc->audio_cid = get_be16(pb);
get_be16(pb); /* packet size = 0 */
st->codec->sample_rate = ((get_be32(pb) >> 16));
@@ -1329,7 +1330,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
unsigned int stss_index = 0;
unsigned int i, j, k;
- if (sc->sample_sizes || st->codec->codec_type == CODEC_TYPE_VIDEO || sc->dv_audio_container) {
+ if (sc->sample_sizes || st->codec->codec_type == CODEC_TYPE_VIDEO ||
+ sc->audio_cid == -2) {
unsigned int current_sample = 0;
unsigned int stts_sample = 0;
unsigned int keyframe, sample_size;