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

Showing the changes to libavformat (2 of 2 files). Show all

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
659 * @param size size of extradata659 * @param size size of extradata
660 * @return >= 0 if OK, AVERROR_xxx on error660 * @return >= 0 if OK, AVERROR_xxx on error
661 */661 */
662int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb, int size);662int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size);
663 663
664/**664/**
665 * Copies the whilelists from one context to the other665 * 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
359 return 0;359 return 0;
360}360}
361 361
362int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb, int size)362int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size)
363{363{
364 int ret = ff_alloc_extradata(par, size);364 int ret = ff_alloc_extradata(par, size);
365 if (ret < 0)365 if (ret < 0)
@@ -368,7 +368,7 @@ int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb · 2 unmodified lines
368 if (ret < 0) {368 if (ret < 0) {
369 av_freep(&par->extradata);369 av_freep(&par->extradata);
370 par->extradata_size = 0;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 return ret;372 return ret;
373 }373 }
374 374

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