I.e. use void* instead of AVFormatContext*, because it is only used for logging.
Unified · Split
| @@ -659,7 +659,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size); · 658 unmodified lines | ||
| 659 | 659 | * @param size size of extradata |
| 660 | 660 | * @return >= 0 if OK, AVERROR_xxx on error |
| 661 | 661 | */ |
| 662 | −int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb, int size); | |
| 662 | +int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size); | |
| 663 | 663 | |
| 664 | 664 | /** |
| 665 | 665 | * Copies the whilelists from one context to the other |
| @@ -359,7 +359,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size) · 358 unmodified lines | ||
| 359 | 359 | return 0; |
| 360 | 360 | } |
| 361 | 361 | |
| 362 | −int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb, int size) | |
| 362 | +int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size) | |
| 363 | 363 | { |
| 364 | 364 | int ret = ff_alloc_extradata(par, size); |
| 365 | 365 | if (ret < 0) |
| @@ -368,7 +368,7 @@ int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb · 2 unmodified lines | ||
| 368 | 368 | if (ret < 0) { |
| 369 | 369 | av_freep(&par->extradata); |
| 370 | 370 | par->extradata_size = 0; |
| 371 | − av_log(s, AV_LOG_ERROR, "Failed to read extradata of size %d\n", size); | |
| 371 | + av_log(logctx, AV_LOG_ERROR, "Failed to read extradata of size %d\n", size); | |
| 372 | 372 | return ret; |
| 373 | 373 | } |
| 374 | 374 | |