The branch, master has been updated
       via  79058e701493071b33b6c6f08a815d07aa6bcdb1 (commit)
       via  e6c03711aa447c553e8ec9f49b21d04a7d662809 (commit)
       via  e918e202e0d0d8f30f2268c728bb503f9110b440 (commit)
      from  a3360c0eafc7733ccfdba6cb109eca41b45a8165 (commit)


- Log -----------------------------------------------------------------
commit 79058e701493071b33b6c6f08a815d07aa6bcdb1
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Wed Sep 3 20:48:07 2025 +0200
Commit:     James Almer <[email protected]>
CommitDate: Wed Sep 3 21:10:21 2025 +0000

    avformat/demux: Reindent after the previous commit
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>

diff --git a/libavformat/demux.c b/libavformat/demux.c
index 6ced69a99b..cc0d57ae97 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -325,12 +325,12 @@ int avformat_open_input(AVFormatContext **ps, const char 
*filename,
     }
 
     if (id3v2_extra_meta) {
-            if ((ret = ff_id3v2_parse_apic(s, id3v2_extra_meta)) < 0)
-                goto close;
-            if ((ret = ff_id3v2_parse_chapters(s, id3v2_extra_meta)) < 0)
-                goto close;
-            if ((ret = ff_id3v2_parse_priv(s, id3v2_extra_meta)) < 0)
-                goto close;
+        if ((ret = ff_id3v2_parse_apic(s, id3v2_extra_meta)) < 0)
+            goto close;
+        if ((ret = ff_id3v2_parse_chapters(s, id3v2_extra_meta)) < 0)
+            goto close;
+        if ((ret = ff_id3v2_parse_priv(s, id3v2_extra_meta)) < 0)
+            goto close;
         ff_id3v2_free_extra_meta(&id3v2_extra_meta);
     }
 

commit e6c03711aa447c553e8ec9f49b21d04a7d662809
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Wed Sep 3 20:46:28 2025 +0200
Commit:     James Almer <[email protected]>
CommitDate: Wed Sep 3 21:10:21 2025 +0000

    avformat/demux: Avoid always-true branch
    
    Since 9d037c54f209958d47ac376d2a9561608f98dfae id3v2_extra_meta
    can only be != NULL if the input format wants ID3v2 tags to be
    read generically.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>

diff --git a/libavformat/demux.c b/libavformat/demux.c
index 14776bc02f..6ced69a99b 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -325,15 +325,12 @@ int avformat_open_input(AVFormatContext **ps, const char 
*filename,
     }
 
     if (id3v2_extra_meta) {
-        if (is_id3v2_format(s->iformat)) {
             if ((ret = ff_id3v2_parse_apic(s, id3v2_extra_meta)) < 0)
                 goto close;
             if ((ret = ff_id3v2_parse_chapters(s, id3v2_extra_meta)) < 0)
                 goto close;
             if ((ret = ff_id3v2_parse_priv(s, id3v2_extra_meta)) < 0)
                 goto close;
-        } else
-            av_log(s, AV_LOG_DEBUG, "demuxer does not support additional id3 
data, skipping\n");
         ff_id3v2_free_extra_meta(&id3v2_extra_meta);
     }
 

commit e918e202e0d0d8f30f2268c728bb503f9110b440
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Wed Sep 3 20:38:48 2025 +0200
Commit:     James Almer <[email protected]>
CommitDate: Wed Sep 3 21:10:21 2025 +0000

    avformat/avformat: Make AVFMT_FLAG_ID3V2_AUTO private
    
    This flag governs whether avformat_open_input() reads
    ID3v2 tags generically; some demuxers without this flag
    read these tags themselves in a non-generic way,
    e.g. oma. This makes this flag an implementation detail
    that should not be exposed to the user, i.e. an internal flag.
    
    Given that 9d037c54f209958d47ac376d2a9561608f98dfae
    did not bump version and added no APIchanges entry
    I deemded it inappropriate to bump version or add
    an APIchanges entry for the removal of AVFMT_FLAG_ID3V2_AUTO.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>

diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c
index 21d63ce189..38ac9dcbe7 100644
--- a/libavformat/aacdec.c
+++ b/libavformat/aacdec.c
@@ -208,9 +208,10 @@ retry:
 const FFInputFormat ff_aac_demuxer = {
     .p.name       = "aac",
     .p.long_name  = NULL_IF_CONFIG_SMALL("raw ADTS AAC (Advanced Audio 
Coding)"),
-    .p.flags      = AVFMT_GENERIC_INDEX | AVFMT_FLAG_ID3V2_AUTO,
+    .p.flags      = AVFMT_GENERIC_INDEX,
     .p.extensions = "aac",
     .p.mime_type  = "audio/aac,audio/aacp,audio/x-aac",
+    .flags_internal = FF_INFMT_FLAG_ID3V2_AUTO,
     .read_probe   = adts_aac_probe,
     .read_header  = adts_aac_read_header,
     .read_packet  = adts_aac_read_packet,
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 75c8a4703b..be6e532387 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1435,7 +1435,6 @@ typedef struct AVFormatContext {
 #define AVFMT_FLAG_SORT_DTS    0x10000 ///< try to interleave outputted 
packets by dts (using this flag can slow demuxing down)
 #define AVFMT_FLAG_FAST_SEEK   0x80000 ///< Enable fast, but inaccurate seeks 
for some formats
 #define AVFMT_FLAG_AUTO_BSF   0x200000 ///< Add bitstream filters as requested 
by the muxer
-#define AVFMT_FLAG_ID3V2_AUTO 0x400000 ///< Automatically parse ID3v2 metadata
 
     /**
      * Maximum number of bytes read from input in order to determine stream
diff --git a/libavformat/demux.c b/libavformat/demux.c
index dfc146d9c4..14776bc02f 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -215,7 +215,7 @@ static int update_stream_avctx(AVFormatContext *s)
 }
 
 static av_always_inline int is_id3v2_format(const AVInputFormat *fmt) {
-    return fmt->flags & AVFMT_FLAG_ID3V2_AUTO;
+    return ffifmt(fmt)->flags_internal & FF_INFMT_FLAG_ID3V2_AUTO;
 }
 
 int avformat_open_input(AVFormatContext **ps, const char *filename,
diff --git a/libavformat/demux.h b/libavformat/demux.h
index 7c22c870e2..ab1c001c9f 100644
--- a/libavformat/demux.h
+++ b/libavformat/demux.h
@@ -39,6 +39,11 @@ struct AVDeviceInfoList;
  */
 #define FF_INFMT_FLAG_PREFER_CODEC_FRAMERATE                   (1 << 1)
 
+/**
+ * Automatically parse ID3v2 metadata
+ */
+#define FF_INFMT_FLAG_ID3V2_AUTO                               (1 << 2)
+
 typedef struct FFInputFormat {
     /**
      * The public AVInputFormat. See avformat.h for it.
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 9cfc711493..5b153c7c9e 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -618,10 +618,11 @@ static const AVClass demuxer_class = {
 const FFInputFormat ff_mp3_demuxer = {
     .p.name         = "mp3",
     .p.long_name    = NULL_IF_CONFIG_SMALL("MP2/3 (MPEG audio layer 2/3)"),
-    .p.flags        = AVFMT_GENERIC_INDEX | AVFMT_FLAG_ID3V2_AUTO,
+    .p.flags        = AVFMT_GENERIC_INDEX,
     .p.extensions   = "mp2,mp3,m2a,mpa", /* XXX: use probe */
     .p.priv_class   = &demuxer_class,
     .p.mime_type    = "audio/mpeg",
+    .flags_internal = FF_INFMT_FLAG_ID3V2_AUTO,
     .read_probe     = mp3_read_probe,
     .read_header    = mp3_read_header,
     .read_packet    = mp3_read_packet,
diff --git a/libavformat/tta.c b/libavformat/tta.c
index 26335202c7..70642324af 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -191,9 +191,9 @@ static int tta_read_seek(AVFormatContext *s, int 
stream_index, int64_t timestamp
 const FFInputFormat ff_tta_demuxer = {
     .p.name         = "tta",
     .p.long_name    = NULL_IF_CONFIG_SMALL("TTA (True Audio)"),
-    .p.flags        = AVFMT_FLAG_ID3V2_AUTO,
     .p.extensions   = "tta",
     .priv_data_size = sizeof(TTAContext),
+    .flags_internal = FF_INFMT_FLAG_ID3V2_AUTO,
     .read_probe     = tta_probe,
     .read_header    = tta_read_header,
     .read_packet    = tta_read_packet,
diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c
index 4c47a5f05c..7d701c517a 100644
--- a/libavformat/wavdec.c
+++ b/libavformat/wavdec.c
@@ -1011,10 +1011,11 @@ static const AVClass w64_demuxer_class = {
 const FFInputFormat ff_w64_demuxer = {
     .p.name         = "w64",
     .p.long_name    = NULL_IF_CONFIG_SMALL("Sony Wave64"),
-    .p.flags        = AVFMT_GENERIC_INDEX | AVFMT_FLAG_ID3V2_AUTO,
+    .p.flags        = AVFMT_GENERIC_INDEX,
     .p.codec_tag    = ff_wav_codec_tags_list,
     .p.priv_class   = &w64_demuxer_class,
     .priv_data_size = sizeof(WAVDemuxContext),
+    .flags_internal = FF_INFMT_FLAG_ID3V2_AUTO,
     .read_probe     = w64_probe,
     .read_header    = w64_read_header,
     .read_packet    = wav_read_packet,

-----------------------------------------------------------------------

Summary of changes:
 libavformat/aacdec.c   |  3 ++-
 libavformat/avformat.h |  1 -
 libavformat/demux.c    | 17 +++++++----------
 libavformat/demux.h    |  5 +++++
 libavformat/mp3dec.c   |  3 ++-
 libavformat/tta.c      |  2 +-
 libavformat/wavdec.c   |  3 ++-
 7 files changed, 19 insertions(+), 15 deletions(-)


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to