History

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

Paul B Mahol committed 3 years ago

Commit 97befd71 parent e3143701 file · +5 −3Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/interplayacm.c+5−3
@@ -37,6 +37,7 @@ static int mul_3x5 [5 * 5 * 5]; · 36 unmodified lines
3737 static int mul_2x11[11 * 11];
3838
3939 typedef struct InterplayACMContext {
40+ AVCodecContext *avctx;
4041 GetBitContext gb;
4142 uint8_t *bitstream;
4243 int max_framesize;
@@ -77,6 +78,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 34 unmodified lines
7778 static AVOnce init_static_once = AV_ONCE_INIT;
7879 InterplayACMContext *s = avctx->priv_data;
7980
81+ s->avctx = avctx;
8082 if (avctx->extradata_size < 14)
8183 return AVERROR_INVALIDDATA;
8284
@@ -343,7 +345,7 @@ static int t15(InterplayACMContext *s, unsigned ind, unsigned col) · 260 unmodified lines
343345 /* b = (x1) + (x2 * 3) + (x3 * 9) */
344346 b = get_bits(gb, 5);
345347 if (b > 26) {
346− av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 26\n", b);
348+ av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 26\n", b);
347349 return AVERROR_INVALIDDATA;
348350 }
349351
@@ -372,7 +374,7 @@ static int t27(InterplayACMContext *s, unsigned ind, unsigned col) · 22 unmodified lines
372374 /* b = (x1) + (x2 * 5) + (x3 * 25) */
373375 b = get_bits(gb, 7);
374376 if (b > 124) {
375− av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 124\n", b);
377+ av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 124\n", b);
376378 return AVERROR_INVALIDDATA;
377379 }
378380
@@ -400,7 +402,7 @@ static int t37(InterplayACMContext *s, unsigned ind, unsigned col) · 21 unmodified lines
400402 /* b = (x1) + (x2 * 11) */
401403 b = get_bits(gb, 7);
402404 if (b > 120) {
403− av_log(NULL, AV_LOG_ERROR, "Too large b = %d > 120\n", b);
405+ av_log(s->avctx, AV_LOG_ERROR, "Too large b = %d > 120\n", b);
404406 return AVERROR_INVALIDDATA;
405407 }
406408

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t