]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/aacdec_fixed: Provide context to av_log()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 31 Dec 2018 20:28:31 +0000 (21:28 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 1 Jan 2019 20:11:47 +0000 (21:11 +0100)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/aac.h
libavcodec/aacdec_fixed.c
libavcodec/aacdec_template.c

index 05bc95385f231961e478bd1d0554c15f491b665c..c2b9c980cbdc1091a6865f9d17d48f93c7c1e09f 100644 (file)
@@ -368,7 +368,7 @@ struct AACContext {
                                    INTFLOAT *in, IndividualChannelStream *ics);
     void (*update_ltp)(AACContext *ac, SingleChannelElement *sce);
     void (*vector_pow43)(int *coefs, int len);
-    void (*subband_scale)(int *dst, int *src, int scale, int offset, int len);
+    void (*subband_scale)(int *dst, int *src, int scale, int offset, int len, void *log_context);
 
 };
 
index 1bdb93f5bc876669a2b3b406d71001fed8f6f1b7..2c594c67922050dac5a7f572ea823f2a3cafd830 100644 (file)
@@ -162,7 +162,7 @@ static void vector_pow43(int *coefs, int len)
     }
 }
 
-static void subband_scale(int *dst, int *src, int scale, int offset, int len)
+static void subband_scale(int *dst, int *src, int scale, int offset, int len, void *log_context)
 {
     int ssign = scale < 0 ? -1 : 1;
     int s = FFABS(scale);
@@ -189,7 +189,7 @@ static void subband_scale(int *dst, int *src, int scale, int offset, int len)
             dst[i] = out * (unsigned)ssign;
         }
     } else {
-        av_log(NULL, AV_LOG_ERROR, "Overflow in subband_scale()\n");
+        av_log(log_context, AV_LOG_ERROR, "Overflow in subband_scale()\n");
     }
 }
 
index dce6035d67ebdb39f1355c87df48d7e720963804..721511c5e953a1e8d0fcd2d019ac255c75841a1b 100644 (file)
@@ -1927,7 +1927,7 @@ static int decode_spectrum_and_dequant(AACContext *ac, INTFLOAT coef[1024],
             if (cbt_m1 < NOISE_BT - 1) {
                 for (group = 0; group < (int)g_len; group++, cfo+=128) {
                     ac->vector_pow43(cfo, off_len);
-                    ac->subband_scale(cfo, cfo, sf[idx], 34, off_len);
+                    ac->subband_scale(cfo, cfo, sf[idx], 34, off_len, ac->avctx);
                 }
             }
         }
@@ -2158,7 +2158,7 @@ static void apply_intensity_stereo(AACContext *ac,
                                       coef0 + group * 128 + offsets[i],
                                       scale,
                                       23,
-                                      offsets[i + 1] - offsets[i]);
+                                      offsets[i + 1] - offsets[i] ,ac->avctx);
 #else
                         ac->fdsp->vector_fmul_scalar(coef1 + group * 128 + offsets[i],
                                                     coef0 + group * 128 + offsets[i],