Commit 4c47457f0d for ffmpeg

commit 4c47457f0d88087ce60158d023ce80ef74d046ec
Author: Romain Beauxis <romain.beauxis@gmail.com>
Date:   Thu Nov 5 10:14:07 2026 -0600

    avformat/vorbiscomment: move to vorbis/comment/

    The writer moves to vorbis/comment/writer.c and its header to vorbis/comment.h, following the source tree layout rules.

diff --git a/Makefile b/Makefile
index 745131c75f..8d8b7396ae 100644
--- a/Makefile
+++ b/Makefile
@@ -120,7 +120,7 @@ ffbuild/.config: $(CONFIGURABLE_COMPONENTS)
 	@-tput sgr0 2>/dev/null

 SUBDIR_VARS := CLEANFILES FFLIBS DEVPROGS HOSTPROGS TESTPROGS TOOLS      \
-               HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS            \
+               HEADERS ARCH_HEADERS BUILT_HEADERS SKIPHEADERS HEADER_DIRS            \
                ARMV5TE-OBJS ARMV6-OBJS ARMV8-OBJS VFP-OBJS NEON-OBJS     \
                ALTIVEC-OBJS VSX-OBJS X86ASM-OBJS                         \
                MIPSFPU-OBJS MIPSDSPR2-OBJS MIPSDSP-OBJS MSA-OBJS         \
diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index d03764df7d..68efac4d0d 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -232,7 +232,7 @@ DEP_LIBS := $(foreach lib,$(FFLIBS),$(call PATH_LIBNAME,$(lib),$(CONFIG_SHARED:y
 STATIC_DEP_LIBS := $(foreach lib,$(FFLIBS),$(call PATH_LIBNAME,$(lib)))

 SRC_DIR    := $(SRC_PATH)/lib$(NAME)
-ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
+ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h $(HEADER_DIRS:%=$(SRC_DIR)/%/*.h)))
 SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
 SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
 HOBJS        = $(filter-out $(SKIPHEADERS:.h=.h.o),$(ALLHEADERS:.h=.h.o))
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 1ccaad2733..044eab9534 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -42,6 +42,7 @@ OBJS = allformats.o         \
 OBJS-$(HAVE_LIBC_MSVCRT)                 += file_open.o

 # subsystems
+include $(SRC_PATH)/libavformat/vorbis/comment/Makefile
 OBJS-$(CONFIG_CBS_APV_LAVF)              += cbs_apv.o cbs.o
 OBJS-$(CONFIG_CBS_AV1_LAVF)              += cbs_av1.o cbs.o
 OBJS-$(CONFIG_ISO_MEDIA)                 += isom.o
@@ -228,9 +229,9 @@ OBJS-$(CONFIG_FLAC_DEMUXER)              += flacdec.o rawdec.o \
                                             flac_picture.o   \
                                             oggparsevorbis.o \
                                             replaygain.o     \
-                                            vorbiscomment.o
+                                            vorbis/comment/writer.o
 OBJS-$(CONFIG_FLAC_MUXER)                += flacenc.o flacenc_header.o \
-                                            vorbiscomment.o
+                                            vorbis/comment/writer.o
 OBJS-$(CONFIG_FLIC_DEMUXER)              += flic.o
 OBJS-$(CONFIG_FLV_DEMUXER)               += flvdec.o
 OBJS-$(CONFIG_LIVE_FLV_DEMUXER)          += flvdec.o
@@ -372,10 +373,10 @@ OBJS-$(CONFIG_M4V_DEMUXER)               += m4vdec.o rawdec.o
 OBJS-$(CONFIG_M4V_MUXER)                 += rawenc.o
 OBJS-$(CONFIG_MATROSKA_DEMUXER)          += matroskadec.o matroska.o  \
                                             flac_picture.o rmsipr.o \
-                                            oggparsevorbis.o vorbiscomment.o \
+                                            oggparsevorbis.o vorbis/comment/writer.o \
                                             qtpalette.o replaygain.o dovi_isom.o
 OBJS-$(CONFIG_MATROSKA_MUXER)            += matroskaenc.o matroska.o \
-                                            flacenc_header.o vorbiscomment.o \
+                                            flacenc_header.o vorbis/comment/writer.o \
                                             wv.o dovi_isom.o
 OBJS-$(CONFIG_MCA_DEMUXER)               += mca.o
 OBJS-$(CONFIG_MCC_DEMUXER)               += mccdec.o subtitles.o
@@ -456,18 +457,18 @@ OBJS-$(CONFIG_OGG_DEMUXER)               += oggdec.o         \
                                             oggparsevorbis.o \
                                             oggparsevp8.o    \
                                             replaygain.o     \
-                                            vorbiscomment.o  \
+                                            vorbis/comment/writer.o  \
                                             flac_picture.o
 OBJS-$(CONFIG_OGA_MUXER)                 += oggenc.o \
-                                            vorbiscomment.o
+                                            vorbis/comment/writer.o
 OBJS-$(CONFIG_OGG_MUXER)                 += oggenc.o \
-                                            vorbiscomment.o
+                                            vorbis/comment/writer.o
 OBJS-$(CONFIG_OGV_MUXER)                 += oggenc.o \
-                                            vorbiscomment.o
+                                            vorbis/comment/writer.o
 OBJS-$(CONFIG_OMA_DEMUXER)               += omadec.o pcm.o oma.o
 OBJS-$(CONFIG_OMA_MUXER)                 += omaenc.o rawenc.o oma.o id3v2enc.o
 OBJS-$(CONFIG_OPUS_MUXER)                += oggenc.o \
-                                            vorbiscomment.o
+                                            vorbis/comment/writer.o
 OBJS-$(CONFIG_OSQ_DEMUXER)               += osq.o rawdec.o
 OBJS-$(CONFIG_PAF_DEMUXER)               += paf.o
 OBJS-$(CONFIG_PCM_ALAW_DEMUXER)          += pcmdec.o pcm.o
@@ -593,7 +594,7 @@ OBJS-$(CONFIG_SOX_MUXER)                 += soxenc.o rawenc.o
 OBJS-$(CONFIG_SPDIF_DEMUXER)             += spdif.o spdifdec.o
 OBJS-$(CONFIG_SPDIF_MUXER)               += spdif.o spdifenc.o
 OBJS-$(CONFIG_SPEEX_MUXER)               += oggenc.o \
-                                            vorbiscomment.o
+                                            vorbis/comment/writer.o
 OBJS-$(CONFIG_SRT_DEMUXER)               += srtdec.o subtitles.o
 OBJS-$(CONFIG_SRT_MUXER)                 += srtenc.o
 OBJS-$(CONFIG_STL_DEMUXER)               += stldec.o subtitles.o
diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c
index 5397213fa5..b9e6f6d32a 100644
--- a/libavformat/flacenc.c
+++ b/libavformat/flacenc.c
@@ -32,7 +32,7 @@
 #include "internal.h"
 #include "mux.h"
 #include "version.h"
-#include "vorbiscomment.h"
+#include "libavformat/vorbis/comment.h"


 typedef struct FlacMuxerContext {
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index a8408da8c1..795c65b601 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -39,7 +39,7 @@
 #include "mux.h"
 #include "riff.h"
 #include "version.h"
-#include "vorbiscomment.h"
+#include "libavformat/vorbis/comment.h"
 #include "vvc.h"
 #include "wv.h"

diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index 06b87e8f8e..b38da89236 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -36,7 +36,7 @@
 #include "internal.h"
 #include "mux.h"
 #include "version.h"
-#include "vorbiscomment.h"
+#include "libavformat/vorbis/comment.h"

 #define MAX_PAGE_SIZE 65025

diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 4ecc5bd8aa..f00dbfb517 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -37,7 +37,7 @@
 #include "flac_picture.h"
 #include "internal.h"
 #include "oggdec.h"
-#include "vorbiscomment.h"
+#include "libavformat/vorbis/comment.h"
 #include "replaygain.h"

 static int ogm_chapter(AVFormatContext *as, const uint8_t *key, const uint8_t *val)
diff --git a/libavformat/vorbiscomment.h b/libavformat/vorbis/comment.h
similarity index 92%
rename from libavformat/vorbiscomment.h
rename to libavformat/vorbis/comment.h
index cd8b325fb6..2762d63135 100644
--- a/libavformat/vorbiscomment.h
+++ b/libavformat/vorbis/comment.h
@@ -19,11 +19,11 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */

-#ifndef AVFORMAT_VORBISCOMMENT_H
-#define AVFORMAT_VORBISCOMMENT_H
+#ifndef AVFORMAT_VORBIS_COMMENT_H
+#define AVFORMAT_VORBIS_COMMENT_H

-#include "avformat.h"
-#include "metadata.h"
+#include "libavformat/avformat.h"
+#include "libavformat/metadata.h"

 /**
  * Calculate the length in bytes of a VorbisComment. This is the minimum
@@ -54,4 +54,4 @@ int ff_vorbiscomment_write(AVIOContext *pb, const AVDictionary *m,

 extern const AVMetadataConv ff_vorbiscomment_metadata_conv[];

-#endif /* AVFORMAT_VORBISCOMMENT_H */
+#endif /* AVFORMAT_VORBIS_COMMENT_H */
diff --git a/libavformat/vorbis/comment/Makefile b/libavformat/vorbis/comment/Makefile
new file mode 100644
index 0000000000..4fea9228b0
--- /dev/null
+++ b/libavformat/vorbis/comment/Makefile
@@ -0,0 +1,5 @@
+HEADER_DIRS += vorbis
+
+clean::
+	$(RM) $(CLEANSUFFIXES:%=libavformat/vorbis/%)
+	$(RM) $(CLEANSUFFIXES:%=libavformat/vorbis/comment/%)
diff --git a/libavformat/vorbiscomment.c b/libavformat/vorbis/comment/writer.c
similarity index 96%
rename from libavformat/vorbiscomment.c
rename to libavformat/vorbis/comment/writer.c
index 09973a576d..c0b8f02a80 100644
--- a/libavformat/vorbiscomment.c
+++ b/libavformat/vorbis/comment/writer.c
@@ -19,11 +19,11 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */

-#include "avio.h"
-#include "avio_internal.h"
-#include "avformat.h"
-#include "metadata.h"
-#include "vorbiscomment.h"
+#include "libavformat/avio.h"
+#include "libavformat/avio_internal.h"
+#include "libavformat/avformat.h"
+#include "libavformat/metadata.h"
+#include "libavformat/vorbis/comment.h"
 #include "libavutil/dict.h"

 /**