diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-07-19 23:31:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-07-19 23:31:04 +0200 |
commit | e4c00aca966e0b22777f3d2d6fe9c993151cc5f8 (patch) | |
tree | 4116ad4fe097fbc05a87e40ed73e9b1b6a4e6fdc /libavformat/mov.c | |
parent | a8d8e868c6154f63a9229f913434aaa21833e488 (diff) | |
parent | eeb55f5f2f48dba3cb4530e9c65999471affe26e (diff) | |
download | ffmpeg-e4c00aca966e0b22777f3d2d6fe9c993151cc5f8.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master: (38 commits)
alac: cosmetics: general pretty-printing and comment clean up
alac: calculate buffer size outside the loop in allocate_buffers()
alac: change some data types to plain int
alac: cosmetics: rename some variables and function names
alac: multi-channel decoding support
alac: split element parsing into a separate function
alac: support a read sample size of up to 32
alac: output in planar sample format
alac: add 32-bit decoding support
alac: simplify channel interleaving
alac: use AVPacket fields directly in alac_decode_frame()
alac: fix check for valid max_samples_per_frame
alac: use get_sbits() to read LPC coefficients instead of casting
alac: move the current samples per frame to the ALACContext
alac: avoid using a double-negative when checking if the frame is compressed
alac: factor out output_size check in predictor_decompress_fir_adapt()
alac: factor out loading of next decoded sample in LPC prediction
alac: use index into buffer_out instead of incrementing the pointer
alac: simplify lpc coefficient adaptation
alac: reduce the number of local variables needed in lpc prediction
...
Conflicts:
libavcodec/alac.c
libavformat/cafdec.c
libavformat/mov.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 41 |
1 files changed, 2 insertions, 39 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 0acebc21f1..b4295f8948 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -597,10 +597,6 @@ static int mov_read_dec3(MOVContext *c, AVIOContext *pb, MOVAtom atom) static int mov_read_chan(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; - uint8_t av_unused version; - uint32_t av_unused flags; - uint32_t layout_tag, bitmap, num_descr, label_mask; - int i; if (c->fc->nb_streams < 1) return 0; @@ -609,40 +605,7 @@ static int mov_read_chan(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (atom.size < 16) return 0; - version = avio_r8(pb); - flags = avio_rb24(pb); - - layout_tag = avio_rb32(pb); - bitmap = avio_rb32(pb); - num_descr = avio_rb32(pb); - - if (atom.size < 16ULL + num_descr * 20ULL) - return 0; - - av_dlog(c->fc, "chan: size=%" PRId64 " version=%u flags=%u layout=%u bitmap=%u num_descr=%u\n", - atom.size, version, flags, layout_tag, bitmap, num_descr); - - label_mask = 0; - for (i = 0; i < num_descr; i++) { - uint32_t label; - label = avio_rb32(pb); // mChannelLabel - avio_rb32(pb); // mChannelFlags - avio_rl32(pb); // mCoordinates[0] - avio_rl32(pb); // mCoordinates[1] - avio_rl32(pb); // mCoordinates[2] - if (layout_tag == 0) { - uint32_t mask_incr = ff_mov_get_channel_label(label); - if (mask_incr == 0) { - label_mask = 0; - break; - } - label_mask |= mask_incr; - } - } - if (layout_tag == 0) - st->codec->channel_layout = label_mask; - else - st->codec->channel_layout = ff_mov_get_channel_layout(layout_tag, bitmap); + ff_mov_read_chan(c->fc, st, atom.size - 4); return 0; } @@ -2556,7 +2519,7 @@ static int mov_read_chan2(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (atom.size < 16) return 0; avio_skip(pb, 4); - ff_mov_read_chan(c->fc, atom.size - 4, c->fc->streams[0]->codec); + ff_mov_read_chan(c->fc,c->fc->streams[0], atom.size - 4); return 0; } |