1
0
Fork 0

avcodec/interplayacm: do not use NULL for av_log()

This commit is contained in:
Paul B Mahol 2023-04-27 10:44:20 +02:00
parent e3143703e9
commit 97befd7fcb
1 changed files with 5 additions and 3 deletions

View File

@ -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;
}