History

avformat/internal: Make AVFormatContext* a logctx in ff_get_extradata

I.e. use void* instead of AVFormatContext*, because it is only used for logging.

Andreas Rheinhardt committed 4 years ago

Commit aef16881 parent 78038252 files · +3 −3Browse files

Unified · Split

2 files
  1. libavformat/internal.h +1 −1
  2. libavformat/utils.c +2 −2
libavformat/internal.h+1−1
@@ -659,7 +659,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size); · 658 unmodified lines
659659 * @param size size of extradata
660660 * @return >= 0 if OK, AVERROR_xxx on error
661661 */
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);
663663
664664 /**
665665 * Copies the whilelists from one context to the other
libavformat/utils.c+2−2
@@ -359,7 +359,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size) · 358 unmodified lines
359359 return 0;
360360 }
361361
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)
363363 {
364364 int ret = ff_alloc_extradata(par, size);
365365 if (ret < 0)
@@ -368,7 +368,7 @@ int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb · 2 unmodified lines
368368 if (ret < 0) {
369369 av_freep(&par->extradata);
370370 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);
372372 return ret;
373373 }
374374

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