[FFmpeg-devel] [PATCH v2 1/4] avcodec/eac3dec: add detection of Atmos spatial extension profile

Hendrik Leppkes h.leppkes at gmail.com
Sat Feb 18 20:59:32 EET 2023


On Sat, Feb 18, 2023 at 6:50 PM Marth64 <marth64 at proxyid.net> wrote:
>
> Signed-off-by: Marth64 <marth64 at proxyid.net>
> ---
> - Missed adding the profiles to actual codec descriptor in ac3dec_float
> - Formatting tidyness
>
>  libavcodec/ac3dec.c       |  3 +++
>  libavcodec/ac3dec.h       |  1 +
>  libavcodec/ac3dec_float.c |  2 ++
>  libavcodec/avcodec.h      |  2 ++
>  libavcodec/codec_desc.c   |  1 +
>  libavcodec/eac3dec.c      | 11 ++++++++++-
>  libavcodec/profiles.c     |  5 +++++
>  libavcodec/profiles.h     |  1 +
>  8 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
> index 0b120e6140..b5f4b166d3 100644
> --- a/libavcodec/ac3dec.c
> +++ b/libavcodec/ac3dec.c
> @@ -1714,6 +1714,9 @@ skip:
>      if (!err) {
>          avctx->sample_rate = s->sample_rate;
>          avctx->bit_rate    = s->bit_rate + s->prev_bit_rate;
> +
> +        if (s->eac3_extension_type_a == 1)
> +            avctx->profile = s->eac3_extension_type_a == 1 ? FF_PROFILE_EAC3_DDP_ATMOS : FF_PROFILE_UNKNOWN;
>      }

You have to leave out the if(..) for this to make sense. :)


More information about the ffmpeg-devel mailing list