diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2014-09-26 13:49:21 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-03-11 16:06:40 +0100 |
commit | dc2d0e06af459af9a7f91b65e0a3119acc4f1baa (patch) | |
tree | ab6eec3b82b4242922f48bf5ca8ef7548c5670b2 /libavcodec/mlpdec.c | |
parent | f36f6a608b5b2c17f8876195c61621c8f8607cee (diff) | |
download | ffmpeg-dc2d0e06af459af9a7f91b65e0a3119acc4f1baa.tar.gz |
mlpdec: support TrueHD streams with an Atmos substream
The fourth substream is being discarded, since its not raw audio data,
but an encoded Atmos stream which needs a specialized decoder.
Fixes decoding of the true hd stream from Transformers\ -\ Age\ of\ Extinction\ 2014\ 1080P-003.mkv
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/mlpdec.c')
-rw-r--r-- | libavcodec/mlpdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 8f1b6f42c6..a0b0b9646d 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -355,7 +355,9 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) m->access_unit_size_pow2 = mh.access_unit_size_pow2; m->num_substreams = mh.num_substreams; - m->max_decoded_substream = m->num_substreams - 1; + + /* limit to decoding 3 substreams, as the 4th is used by Dolby Atmos for non-audio data */ + m->max_decoded_substream = FFMIN(m->num_substreams - 1, 2); m->avctx->sample_rate = mh.group1_samplerate; m->avctx->frame_size = mh.access_unit_size; |