summaryrefslogtreecommitdiff
path: root/libavformat/isom.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-19 23:31:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-19 23:31:04 +0200
commite4c00aca966e0b22777f3d2d6fe9c993151cc5f8 (patch)
tree4116ad4fe097fbc05a87e40ed73e9b1b6a4e6fdc /libavformat/isom.c
parenta8d8e868c6154f63a9229f913434aaa21833e488 (diff)
parenteeb55f5f2f48dba3cb4530e9c65999471affe26e (diff)
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/isom.c')
-rw-r--r--libavformat/isom.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libavformat/isom.c b/libavformat/isom.c
index bcd5894f0a..c110b7f6fa 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -499,25 +499,30 @@ static const MovChannelLayout mov_channel_layout[] = {
{ AV_CH_LAYOUT_4POINT0|AV_CH_LOW_FREQUENCY, (137<<16) | 5}, // kCAFChannelLayoutTag_DVD_11
{ 0, 0},
};
-
-void ff_mov_read_chan(AVFormatContext *s, int64_t size, AVCodecContext *codec)
+#if 0
+int ff_mov_read_chan(AVFormatContext *s, AVStream *st, int64_t size)
{
+ AVCodecContext *codec= st->codec;
uint32_t layout_tag;
AVIOContext *pb = s->pb;
const MovChannelLayout *layouts = mov_channel_layout;
+
+ if (size < 12)
+ return AVERROR_INVALIDDATA;
+
layout_tag = avio_rb32(pb);
size -= 4;
if (layout_tag == 0) { // kCAFChannelLayoutTag_UseChannelDescriptions
// Channel descriptions not implemented
av_log_ask_for_sample(s, "Unimplemented container channel layout.\n");
avio_skip(pb, size);
- return;
+ return 0;
}
if (layout_tag == 0x10000) { // kCAFChannelLayoutTag_UseChannelBitmap
codec->channel_layout = avio_rb32(pb);
size -= 4;
avio_skip(pb, size);
- return;
+ return 0;
}
while (layouts->channel_layout) {
if (layout_tag == layouts->layout_tag) {
@@ -529,7 +534,10 @@ void ff_mov_read_chan(AVFormatContext *s, int64_t size, AVCodecContext *codec)
if (!codec->channel_layout)
av_log(s, AV_LOG_WARNING, "Unknown container channel layout.\n");
avio_skip(pb, size);
+
+ return 0;
}
+#endif
void ff_mov_write_chan(AVIOContext *pb, int64_t channel_layout)
{