[FFmpeg-cvslog] avcodec: use avpriv_mpeg4audio_get_config2()

James Almer git at videolan.org
Fri Sep 27 16:39:49 EEST 2019


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sat Sep 21 20:04:33 2019 -0300| [d582cc17e1f668c3b3ff5c3e36cc68c85161f0a7] | committer: James Almer

avcodec: use avpriv_mpeg4audio_get_config2()

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d582cc17e1f668c3b3ff5c3e36cc68c85161f0a7
---

 libavcodec/aac_adtstoasc_bsf.c     | 4 ++--
 libavcodec/alsdec.c                | 4 ++--
 libavcodec/mpegaudiodec_template.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/aac_adtstoasc_bsf.c b/libavcodec/aac_adtstoasc_bsf.c
index 6541b1189c..e378296950 100644
--- a/libavcodec/aac_adtstoasc_bsf.c
+++ b/libavcodec/aac_adtstoasc_bsf.c
@@ -134,8 +134,8 @@ static int aac_adtstoasc_init(AVBSFContext *ctx)
     /* Validate the extradata if the stream is already MPEG-4 AudioSpecificConfig */
     if (ctx->par_in->extradata) {
         MPEG4AudioConfig mp4ac;
-        int ret = avpriv_mpeg4audio_get_config(&mp4ac, ctx->par_in->extradata,
-                                               ctx->par_in->extradata_size * 8, 1);
+        int ret = avpriv_mpeg4audio_get_config2(&mp4ac, ctx->par_in->extradata,
+                                                ctx->par_in->extradata_size, 1, ctx);
         if (ret < 0) {
             av_log(ctx, AV_LOG_ERROR, "Error parsing AudioSpecificConfig extradata!\n");
             return ret;
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 56313d206c..fafc3a757b 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -302,8 +302,8 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
     if ((ret = init_get_bits8(&gb, avctx->extradata, avctx->extradata_size)) < 0)
         return ret;
 
-    config_offset = avpriv_mpeg4audio_get_config(&m4ac, avctx->extradata,
-                                                 avctx->extradata_size * 8, 1);
+    config_offset = avpriv_mpeg4audio_get_config2(&m4ac, avctx->extradata,
+                                                  avctx->extradata_size, 1, avctx);
 
     if (config_offset < 0)
         return AVERROR_INVALIDDATA;
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c
index 9cce88e263..3f1674e827 100644
--- a/libavcodec/mpegaudiodec_template.c
+++ b/libavcodec/mpegaudiodec_template.c
@@ -1851,8 +1851,8 @@ static av_cold int decode_init_mp3on4(AVCodecContext * avctx)
         return AVERROR_INVALIDDATA;
     }
 
-    avpriv_mpeg4audio_get_config(&cfg, avctx->extradata,
-                                 avctx->extradata_size * 8, 1);
+    avpriv_mpeg4audio_get_config2(&cfg, avctx->extradata,
+                                  avctx->extradata_size, 1, avctx);
     if (!cfg.chan_config || cfg.chan_config > 7) {
         av_log(avctx, AV_LOG_ERROR, "Invalid channel config number.\n");
         return AVERROR_INVALIDDATA;



More information about the ffmpeg-cvslog mailing list