[FFmpeg-cvslog] avformat/internal: Make AVFormatContext* a logctx in ff_get_extradata
Andreas Rheinhardt
git at videolan.org
Tue May 10 09:35:36 EEST 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Fri May 6 21:17:13 2022 +0200| [aef16886dde59d41bdeef8dfe78cd7d9055bf50e] | committer: Andreas Rheinhardt
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 at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aef16886dde59d41bdeef8dfe78cd7d9055bf50e
---
libavformat/internal.h | 2 +-
libavformat/utils.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 4392f17d71..d46368228c 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -659,7 +659,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size);
* @param size size of extradata
* @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
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 98113086bd..00c0751195 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -359,7 +359,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int size)
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);
if (ret < 0)
@@ -368,7 +368,7 @@ int ff_get_extradata(AVFormatContext *s, AVCodecParameters *par, AVIOContext *pb
if (ret < 0) {
av_freep(&par->extradata);
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;
}
More information about the ffmpeg-cvslog
mailing list