You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avformat/internal: Make AVFormatContext* a logctx in ff_get_extradata
I.e. use void* instead of AVFormatContext*, because it is only used for logging. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -659,7 +659,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size);
|
|||||||
* @param size size of extradata
|
* @param size size of extradata
|
||||||
* @return >= 0 if OK, AVERROR_xxx on error
|
* @return >= 0 if OK, AVERROR_xxx on error
|
||||||
*/
|
*/
|
||||||
int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb, int size);
|
int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copies the whilelists from one context to the other
|
* Copies the whilelists from one context to the other
|
||||||
|
@@ -359,7 +359,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb, int size)
|
int ff_get_extradata(void *logctx, AVCodecParameters *par, AVIOContext *pb, int size)
|
||||||
{
|
{
|
||||||
int ret = ff_alloc_extradata(par, size);
|
int ret = ff_alloc_extradata(par, size);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@@ -368,7 +368,7 @@ int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_freep(&par->extradata);
|
av_freep(&par->extradata);
|
||||||
par->extradata_size = 0;
|
par->extradata_size = 0;
|
||||||
av_log(s, AV_LOG_ERROR, "Failed to read extradata of size %d\n", size);
|
av_log(logctx, AV_LOG_ERROR, "Failed to read extradata of size %d\n", size);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user