From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 12/13] avformat: Enforce codec_id where appropriate
Date: Wed, 20 Mar 2024 03:12:55 +0100
Message-ID: <AS8P250MB07445F538D382E5B3B91EB528F332@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <AS8P250MB07447D5624C9B5EA91D18ED18F332@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>
E.g. chromaprint expects to be fed 16bit signed PCM
in native endianness, yet there was no check for this.
Similarly for other muxers. Use the new
FF_OFMT_FLAG_ONLY_DEFAULT_CODECS to enfore this where
appropriate, e.g. for pcm/raw muxers.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavformat/chromaprint.c | 3 +-
libavformat/daudenc.c | 3 +-
libavformat/filmstripenc.c | 3 +-
libavformat/fitsenc.c | 3 +-
libavformat/idroqenc.c | 3 +-
libavformat/jacosubenc.c | 3 +-
libavformat/mmf.c | 3 +-
libavformat/mpjpeg.c | 2 +
libavformat/pcmenc.c | 3 +-
libavformat/rawenc.c | 102 ++++++++++++++++++++++++-------------
libavformat/ttaenc.c | 3 +-
11 files changed, 88 insertions(+), 43 deletions(-)
diff --git a/libavformat/chromaprint.c b/libavformat/chromaprint.c
index 62264d6a4b..4beb75c7a9 100644
--- a/libavformat/chromaprint.c
+++ b/libavformat/chromaprint.c
@@ -179,7 +179,8 @@ const FFOutputFormat ff_chromaprint_muxer = {
.p.audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_header = write_header,
.write_packet = write_packet,
.write_trailer = write_trailer,
diff --git a/libavformat/daudenc.c b/libavformat/daudenc.c
index f1e0da058b..5c8db5104e 100644
--- a/libavformat/daudenc.c
+++ b/libavformat/daudenc.c
@@ -64,7 +64,8 @@ const FFOutputFormat ff_daud_muxer = {
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
.p.flags = AVFMT_NOTIMESTAMPS,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.init = daud_init,
.write_packet = daud_write_packet,
};
diff --git a/libavformat/filmstripenc.c b/libavformat/filmstripenc.c
index b2a4cee8fa..ec9c814f8c 100644
--- a/libavformat/filmstripenc.c
+++ b/libavformat/filmstripenc.c
@@ -67,7 +67,8 @@ const FFOutputFormat ff_filmstrip_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_RAWVIDEO,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_header = write_header,
.write_packet = ff_raw_write_packet,
.write_trailer = write_trailer,
diff --git a/libavformat/fitsenc.c b/libavformat/fitsenc.c
index 605056af59..a8efe93d3c 100644
--- a/libavformat/fitsenc.c
+++ b/libavformat/fitsenc.c
@@ -199,7 +199,8 @@ const FFOutputFormat ff_fits_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_FITS,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.priv_data_size = sizeof(FITSContext),
.write_header = fits_write_header,
.write_packet = fits_write_packet,
diff --git a/libavformat/idroqenc.c b/libavformat/idroqenc.c
index 75a191189c..f3172692e0 100644
--- a/libavformat/idroqenc.c
+++ b/libavformat/idroqenc.c
@@ -67,7 +67,8 @@ const FFOutputFormat ff_roq_muxer = {
.p.audio_codec = AV_CODEC_ID_ROQ_DPCM,
.p.video_codec = AV_CODEC_ID_ROQ,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_header = roq_write_header,
.write_packet = ff_raw_write_packet,
};
diff --git a/libavformat/jacosubenc.c b/libavformat/jacosubenc.c
index a792fda42e..428505e51f 100644
--- a/libavformat/jacosubenc.c
+++ b/libavformat/jacosubenc.c
@@ -39,7 +39,8 @@ const FFOutputFormat ff_jacosub_muxer = {
.p.video_codec = AV_CODEC_ID_NONE,
.p.audio_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_JACOSUB,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_header = jacosub_write_header,
.write_packet = ff_raw_write_packet,
};
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index fab4509711..42a88cff90 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -320,7 +320,8 @@ const FFOutputFormat ff_mmf_muxer = {
.p.audio_codec = AV_CODEC_ID_ADPCM_YAMAHA,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_header = mmf_write_header,
.write_packet = ff_raw_write_packet,
.write_trailer = mmf_write_trailer,
diff --git a/libavformat/mpjpeg.c b/libavformat/mpjpeg.c
index 81ace8e9ee..8641c9c670 100644
--- a/libavformat/mpjpeg.c
+++ b/libavformat/mpjpeg.c
@@ -70,6 +70,8 @@ const FFOutputFormat ff_mpjpeg_muxer = {
.priv_data_size = sizeof(MPJPEGContext),
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_MJPEG,
+ .p.subtitle_codec = AV_CODEC_ID_NONE,
+ .flags_internal = FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_header = mpjpeg_write_header,
.write_packet = mpjpeg_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
diff --git a/libavformat/pcmenc.c b/libavformat/pcmenc.c
index 4879f1deed..c4dd8e43c5 100644
--- a/libavformat/pcmenc.c
+++ b/libavformat/pcmenc.c
@@ -35,7 +35,8 @@ const FFOutputFormat ff_pcm_ ## name_ ## _muxer = { \
.p.video_codec = AV_CODEC_ID_NONE, \
.p.subtitle_codec = AV_CODEC_ID_NONE, \
.p.flags = AVFMT_NOTIMESTAMPS, \
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH, \
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH | \
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS, \
.write_packet = ff_raw_write_packet, \
};
#define PCMDEF_2(name, long_name, ext, codec, enabled) \
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index 49dc0a9109..cf298d223d 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -45,7 +45,8 @@ const FFOutputFormat ff_ac3_muxer = {
.p.audio_codec = AV_CODEC_ID_AC3,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -78,7 +79,8 @@ const FFOutputFormat ff_adx_muxer = {
.p.audio_codec = AV_CODEC_ID_ADPCM_ADX,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.write_trailer = adx_write_trailer,
.p.flags = AVFMT_NOTIMESTAMPS,
@@ -93,7 +95,8 @@ const FFOutputFormat ff_aptx_muxer = {
.p.audio_codec = AV_CODEC_ID_APTX,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -107,7 +110,8 @@ const FFOutputFormat ff_aptx_hd_muxer = {
.p.audio_codec = AV_CODEC_ID_APTX_HD,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -121,7 +125,8 @@ const FFOutputFormat ff_avs2_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_AVS2,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -135,7 +140,8 @@ const FFOutputFormat ff_avs3_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_AVS3,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -150,7 +156,8 @@ const FFOutputFormat ff_cavsvideo_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_CAVS,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -163,7 +170,8 @@ const FFOutputFormat ff_codec2raw_muxer = {
.p.audio_codec = AV_CODEC_ID_CODEC2,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -197,7 +205,8 @@ const FFOutputFormat ff_dfpwm_muxer = {
.p.audio_codec = AV_CODEC_ID_DFPWM,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -211,7 +220,8 @@ const FFOutputFormat ff_dirac_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_DIRAC,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -225,7 +235,8 @@ const FFOutputFormat ff_dnxhd_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_DNXHD,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -240,7 +251,8 @@ const FFOutputFormat ff_dts_muxer = {
.p.audio_codec = AV_CODEC_ID_DTS,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -255,7 +267,8 @@ const FFOutputFormat ff_eac3_muxer = {
.p.audio_codec = AV_CODEC_ID_EAC3,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -270,7 +283,8 @@ const FFOutputFormat ff_g722_muxer = {
.p.audio_codec = AV_CODEC_ID_ADPCM_G722,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -285,7 +299,8 @@ const FFOutputFormat ff_g723_1_muxer = {
.p.audio_codec = AV_CODEC_ID_G723_1,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -298,7 +313,8 @@ const FFOutputFormat ff_g726_muxer = {
.p.audio_codec = AV_CODEC_ID_ADPCM_G726,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -311,7 +327,8 @@ const FFOutputFormat ff_g726le_muxer = {
.p.audio_codec = AV_CODEC_ID_ADPCM_G726LE,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -326,7 +343,8 @@ const FFOutputFormat ff_gsm_muxer = {
.p.audio_codec = AV_CODEC_ID_GSM,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -341,7 +359,8 @@ const FFOutputFormat ff_h261_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_H261,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -356,7 +375,8 @@ const FFOutputFormat ff_h263_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_H263,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -379,7 +399,8 @@ const FFOutputFormat ff_h264_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_H264,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.check_bitstream = h264_check_bitstream,
.p.flags = AVFMT_NOTIMESTAMPS,
@@ -403,7 +424,8 @@ const FFOutputFormat ff_vvc_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_VVC,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.check_bitstream = vvc_check_bitstream,
.p.flags = AVFMT_NOTIMESTAMPS,
@@ -427,7 +449,8 @@ const FFOutputFormat ff_hevc_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_HEVC,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.check_bitstream = hevc_check_bitstream,
.p.flags = AVFMT_NOTIMESTAMPS,
@@ -442,7 +465,8 @@ const FFOutputFormat ff_evc_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_EVC,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -456,7 +480,8 @@ const FFOutputFormat ff_m4v_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_MPEG4,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -471,7 +496,8 @@ const FFOutputFormat ff_mjpeg_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_MJPEG,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -485,7 +511,8 @@ const FFOutputFormat ff_mlp_muxer = {
.p.audio_codec = AV_CODEC_ID_MLP,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -500,7 +527,8 @@ const FFOutputFormat ff_mp2_muxer = {
.p.audio_codec = AV_CODEC_ID_MP2,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -515,7 +543,8 @@ const FFOutputFormat ff_mpeg1video_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_MPEG1VIDEO,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -529,7 +558,8 @@ const FFOutputFormat ff_mpeg2video_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_MPEG2VIDEO,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -549,7 +579,8 @@ const FFOutputFormat ff_obu_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_AV1,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.check_bitstream = obu_check_bitstream,
.p.flags = AVFMT_NOTIMESTAMPS,
@@ -578,7 +609,8 @@ const FFOutputFormat ff_sbc_muxer = {
.p.audio_codec = AV_CODEC_ID_SBC,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -592,7 +624,8 @@ const FFOutputFormat ff_truehd_muxer = {
.p.audio_codec = AV_CODEC_ID_TRUEHD,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
@@ -606,7 +639,8 @@ const FFOutputFormat ff_vc1_muxer = {
.p.audio_codec = AV_CODEC_ID_NONE,
.p.video_codec = AV_CODEC_ID_VC1,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.write_packet = ff_raw_write_packet,
.p.flags = AVFMT_NOTIMESTAMPS,
};
diff --git a/libavformat/ttaenc.c b/libavformat/ttaenc.c
index 661aa8fc83..671820f00e 100644
--- a/libavformat/ttaenc.c
+++ b/libavformat/ttaenc.c
@@ -169,7 +169,8 @@ const FFOutputFormat ff_tta_muxer = {
.p.audio_codec = AV_CODEC_ID_TTA,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
.init = tta_init,
.deinit = tta_deinit,
.write_header = tta_write_header,
--
2.40.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-03-20 2:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 2:07 [FFmpeg-devel] [PATCH 01/13] avformat/mp3enc: Improve query_codec Andreas Rheinhardt
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 02/13] libavformat/westwood_audenc: Use proper logcontext Andreas Rheinhardt
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 03/13] avformat/mux: Rename FF_FMT_ALLOW_FLUSH->FF_OFMT_FLAG_ALLOW_FLUSH Andreas Rheinhardt
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 04/13] avformat/codec2: Don't allocate Codec2Context for muxer Andreas Rheinhardt
2024-03-20 11:23 ` Tomas Härdin
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 05/13] avformat/amr: Move write_header closer to muxer definition Andreas Rheinhardt
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 06/13] avformat/mux_utils: Don't report that AV_CODEC_ID_NONE can be muxed Andreas Rheinhardt
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 07/13] fate/filter-audio: Don't use pcm output for channelsplit test Andreas Rheinhardt
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 08/13] avformat/mux: Add flag for "not more than one stream of each type" Andreas Rheinhardt
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 09/13] avformat: Enforce one-stream limit where appropriate Andreas Rheinhardt
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 10/13] avformat/mux: Add flag for "only default codecs allowed" Andreas Rheinhardt
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 11/13] avformat/ttmlenc: Avoid unnecessary block Andreas Rheinhardt
2024-03-20 2:12 ` Andreas Rheinhardt [this message]
2024-03-20 2:12 ` [FFmpeg-devel] [PATCH 13/13] avformat: Make init function out of write_header functions if possible Andreas Rheinhardt
2024-03-22 12:13 ` [FFmpeg-devel] [PATCH 01/13] avformat/mp3enc: Improve query_codec Andreas Rheinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AS8P250MB07445F538D382E5B3B91EB528F332@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git