On 05/06/2024 07:33, Andreas Rheinhardt wrote:
Lynne via ffmpeg-devel:
This allows users to determine whether a stream is USAC or not.
---
  libavcodec/aac/aacdec_usac.c | 4 ++++
  libavcodec/avcodec.h         | 1 +
  libavcodec/defs.h            | 1 +
  libavcodec/profiles.c        | 1 +
  libavcodec/profiles.h        | 1 +
  5 files changed, 8 insertions(+)

diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c
index 7b36b49d63..5c3bb8d4ac 100644
--- a/libavcodec/aac/aacdec_usac.c
+++ b/libavcodec/aac/aacdec_usac.c
@@ -494,6 +494,8 @@ int ff_aac_usac_config_decode(AACDecContext *ac, 
AVCodecContext *avctx,
          }
      }
+ ac->avctx->profile = AV_PROFILE_AAC_USAC;
+
      ret = ff_aac_usac_reset_state(ac, oc);
      if (ret < 0)
          return ret;
@@ -1533,6 +1535,8 @@ int ff_aac_usac_decode_frame(AVCodecContext *avctx, 
AACDecContext *ac,
      ff_aac_output_configure(ac, ac->oc[1].layout_map, 
ac->oc[1].layout_map_tags,
                              ac->oc[1].status, 0);
+ ac->avctx->profile = AV_PROFILE_AAC_USAC;
+
      indep_flag = get_bits1(gb);
nb_ch_el = 0;
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 2da63c87ea..257e04fe2d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1652,6 +1652,7 @@ typedef struct AVCodecContext {
  #define FF_PROFILE_AAC_HE_V2 28
  #define FF_PROFILE_AAC_LD   22
  #define FF_PROFILE_AAC_ELD  38
+#define FF_PROFILE_AAC_USAC 41

Don't add new deprecated defines.

Didn't notice. Removed locally.

Attachment: OpenPGP_0xA2FEA5F03F034464.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to