Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -37,6 +37,7 @@ static int mul_3x5 [5 * 5 * 5]; · 36 unmodified lines | ||
| 37 | 37 | static int mul_2x11[11 * 11]; |
| 38 | 38 | |
| 39 | 39 | typedef struct InterplayACMContext { |
| 40 | + AVCodecContext *avctx; | |
| 40 | 41 | GetBitContext gb; |
| 41 | 42 | uint8_t *bitstream; |
| 42 | 43 | int max_framesize; |
| @@ -77,6 +78,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 34 unmodified lines | ||
| 77 | 78 | static AVOnce init_static_once = AV_ONCE_INIT; |
| 78 | 79 | InterplayACMContext *s = avctx->priv_data; |
| 79 | 80 | |
| 81 | + s->avctx = avctx; | |
| 80 | 82 | if (avctx->extradata_size < 14) |
| 81 | 83 | return AVERROR_INVALIDDATA; |
| 82 | 84 | |
| @@ -343,7 +345,7 @@ static int t15(InterplayACMContext *s, unsigned ind, unsigned col) · 260 unmodified lines | ||
| 343 | 345 | /* b = (x1) + (x2 * 3) + (x3 * 9) */ |
| 344 | 346 | b = get_bits(gb, 5); |
| 345 | 347 | 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); | |
| 347 | 349 | return AVERROR_INVALIDDATA; |
| 348 | 350 | } |
| 349 | 351 | |
| @@ -372,7 +374,7 @@ static int t27(InterplayACMContext *s, unsigned ind, unsigned col) · 22 unmodified lines | ||
| 372 | 374 | /* b = (x1) + (x2 * 5) + (x3 * 25) */ |
| 373 | 375 | b = get_bits(gb, 7); |
| 374 | 376 | 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); | |
| 376 | 378 | return AVERROR_INVALIDDATA; |
| 377 | 379 | } |
| 378 | 380 | |
| @@ -400,7 +402,7 @@ static int t37(InterplayACMContext *s, unsigned ind, unsigned col) · 21 unmodified lines | ||
| 400 | 402 | /* b = (x1) + (x2 * 11) */ |
| 401 | 403 | b = get_bits(gb, 7); |
| 402 | 404 | 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); | |
| 404 | 406 | return AVERROR_INVALIDDATA; |
| 405 | 407 | } |
| 406 | 408 | |