On 26 Sep 2014, at 13:49, Hendrik Leppkes <h.lepp...@gmail.com> wrote:

> 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

s/true hd/truehd

> 
> Signed-off-by: Michael Niedermayer <michae...@gmx.at>

If you believe in the patch, signed it off too ;-)

> ---
> libavcodec/mlp.h    | 2 +-
> libavcodec/mlpdec.c | 4 +++-
> 2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/mlp.h b/libavcodec/mlp.h
> index 5a4ee5f..8a1584e 100644
> --- a/libavcodec/mlp.h
> +++ b/libavcodec/mlp.h
> @@ -45,7 +45,7 @@
> /** Maximum number of substreams that can be decoded.
>  *  MLP's limit is 2. TrueHD supports at least up to 3.
>  */
> -#define MAX_SUBSTREAMS      3
> +#define MAX_SUBSTREAMS      4
> 
> /** which multiple of 48000 the maximum sample rate is */
> #define MAX_RATEFACTOR      4
> diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
> index ad9e54f..5ace18d 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 */

I don't really like this comment. Maybe "non-MLP data"? Also, but even more 
minor: "limit decoding to 3 substreams" perhaps? And while we're at it, "can be 
used"?

Tim
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to