[FFmpeg-cvslog] avformat/isom: make parameters used for loging a pointer to void

James Almer git at videolan.org
Sat Aug 31 20:58:37 EEST 2024


ffmpeg | branch: release/7.0 | James Almer <jamrial at gmail.com> | Thu Aug 29 21:17:38 2024 -0300| [48a53bc2c72c91c8fc00ec6d8184f0829eb0a8fa] | committer: James Almer

avformat/isom: make parameters used for loging a pointer to void

Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 9d095f127a38c587ebc217353e80d400d77629fc)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=48a53bc2c72c91c8fc00ec6d8184f0829eb0a8fa
---

 libavformat/isom.c | 18 +++++++++---------
 libavformat/isom.h |  4 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/libavformat/isom.c b/libavformat/isom.c
index c5930bd4d8..0e9b7ba0d9 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -292,12 +292,12 @@ int ff_mp4_read_descr_len(AVIOContext *pb)
     return len;
 }
 
-int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag)
+int ff_mp4_read_descr(void *logctx, AVIOContext *pb, int *tag)
 {
     int len;
     *tag = avio_r8(pb);
     len = ff_mp4_read_descr_len(pb);
-    av_log(fc, AV_LOG_TRACE, "MPEG-4 description: tag=0x%02x len=%d\n", *tag, len);
+    av_log(logctx, AV_LOG_TRACE, "MPEG-4 description: tag=0x%02x len=%d\n", *tag, len);
     return len;
 }
 
@@ -326,7 +326,7 @@ static const AVCodecTag mp4_audio_types[] = {
     { AV_CODEC_ID_NONE,   AOT_NULL },
 };
 
-int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb)
+int ff_mp4_read_dec_config_descr(void *logctx, AVStream *st, AVIOContext *pb)
 {
     enum AVCodecID codec_id;
     int len, tag;
@@ -341,22 +341,22 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
     codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id);
     if (codec_id)
         st->codecpar->codec_id = codec_id;
-    av_log(fc, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id);
-    len = ff_mp4_read_descr(fc, pb, &tag);
+    av_log(logctx, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id);
+    len = ff_mp4_read_descr(logctx, pb, &tag);
     if (tag == MP4DecSpecificDescrTag) {
-        av_log(fc, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len);
+        av_log(logctx, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len);
         /* As per 14496-3:2009 9.D.2.2, No decSpecificInfo is defined
            for MPEG-1 Audio or MPEG-2 Audio; MPEG-2 AAC excluded. */
         if (object_type_id == 0x69 || object_type_id == 0x6b)
             return 0;
         if (!len || (uint64_t)len > (1<<30))
             return AVERROR_INVALIDDATA;
-        if ((ret = ff_get_extradata(fc, st->codecpar, pb, len)) < 0)
+        if ((ret = ff_get_extradata(logctx, st->codecpar, pb, len)) < 0)
             return ret;
         if (st->codecpar->codec_id == AV_CODEC_ID_AAC) {
             MPEG4AudioConfig cfg = {0};
             ret = avpriv_mpeg4audio_get_config2(&cfg, st->codecpar->extradata,
-                                                st->codecpar->extradata_size, 1, fc);
+                                                st->codecpar->extradata_size, 1, logctx);
             if (ret < 0)
                 return ret;
             av_channel_layout_uninit(&st->codecpar->ch_layout);
@@ -368,7 +368,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
                 st->codecpar->sample_rate = cfg.ext_sample_rate;
             else
                 st->codecpar->sample_rate = cfg.sample_rate;
-            av_log(fc, AV_LOG_TRACE, "mp4a config channels %d obj %d ext obj %d "
+            av_log(logctx, AV_LOG_TRACE, "mp4a config channels %d obj %d ext obj %d "
                     "sample rate %d ext sample rate %d\n", cfg.channels,
                     cfg.object_type, cfg.ext_object_type,
                     cfg.sample_rate, cfg.ext_sample_rate);
diff --git a/libavformat/isom.h b/libavformat/isom.h
index c0a5788e08..b7ccc9994b 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -359,8 +359,8 @@ typedef struct MOVContext {
 } MOVContext;
 
 int ff_mp4_read_descr_len(AVIOContext *pb);
-int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag);
-int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb);
+int ff_mp4_read_descr(void *logctx, AVIOContext *pb, int *tag);
+int ff_mp4_read_dec_config_descr(void *logctx, AVStream *st, AVIOContext *pb);
 void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id);
 
 #define MP4ODescrTag                    0x01



More information about the ffmpeg-cvslog mailing list