aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-04-27 10:44:20 +0200
committerPaul B Mahol <onemda@gmail.com>2023-04-27 18:34:22 +0200
commit97befd7fcb985b0c038fb200e2c8fea9861ba1fd (patch)
treecb2d844481e2479c211ff1fec40f506de74cd81b
parente3143703e9782b3622ed747a9c552a41b1fcaede (diff)
downloadffmpeg-97befd7fcb985b0c038fb200e2c8fea9861ba1fd.tar.gz
avcodec/interplayacm: do not use NULL for av_log()
-rw-r--r--libavcodec/interplayacm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/interplayacm.c b/libavcodec/interplayacm.c
index a0b9655e7a..057ab16e85 100644
--- a/libavcodec/interplayacm.c
+++ b/libavcodec/interplayacm.c
@@ -37,6 +37,7 @@ static int mul_3x5 [5 * 5 * 5];
static int mul_2x11[11 * 11];
typedef struct InterplayACMContext {
+ AVCodecContext *avctx;
GetBitContext gb;
uint8_t *bitstream;
int max_framesize;
@@ -77,6 +78,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
static AVOnce init_static_once = AV_ONCE_INIT;
InterplayACMContext *s = avctx->priv_data;
+ s->avctx = avctx;
if (avctx->extradata_size < 14)
return AVERROR_INVALIDDATA;
@@ -343,7 +345,7 @@ static int t15(InterplayACMContext *s, unsigned ind, unsigned col)
/* b = (x1) + (x2 * 3) + (x3 * 9) */
b = get_bits(gb, 5);
if (b > 26) {
- av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 26\n", b);
+ av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 26\n", b);
return AVERROR_INVALIDDATA;
}
@@ -372,7 +374,7 @@ static int t27(InterplayACMContext *s, unsigned ind, unsigned col)
/* b = (x1) + (x2 * 5) + (x3 * 25) */
b = get_bits(gb, 7);
if (b > 124) {
- av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 124\n", b);
+ av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 124\n", b);
return AVERROR_INVALIDDATA;
}
@@ -400,7 +402,7 @@ static int t37(InterplayACMContext *s, unsigned ind, unsigned col)
/* b = (x1) + (x2 * 11) */
b = get_bits(gb, 7);
if (b > 120) {
- av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 120\n", b);
+ av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 120\n", b);
return AVERROR_INVALIDDATA;
}