aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/kvag.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-19 23:28:36 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-22 23:57:19 +0100
commita24bccc23859b37e03cbf395b3349cb4f707b3e0 (patch)
tree6fb3d44ad0b78c8e8ebf9c10c83da94e7ef015c6 /libavformat/kvag.c
parent03b04eef72a5f23e30c2d7700b290d915c31d3a1 (diff)
downloadffmpeg-a24bccc23859b37e03cbf395b3349cb4f707b3e0.tar.gz
avformat/mux: Add flag for "only default codecs allowed"
AVOutputFormat has default codecs for audio, video and subtitle and often these are the only codecs of this type allowed. So add a flag to AVOutputFormat so that this can be checked generically. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/kvag.c')
-rw-r--r--libavformat/kvag.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavformat/kvag.c b/libavformat/kvag.c
index 2053f4730d..1d0aee0994 100644
--- a/libavformat/kvag.c
+++ b/libavformat/kvag.c
@@ -131,12 +131,6 @@ static int kvag_write_init(AVFormatContext *s)
{
AVCodecParameters *par = s->streams[0]->codecpar;
- if (par->codec_id != AV_CODEC_ID_ADPCM_IMA_SSI) {
- av_log(s, AV_LOG_ERROR, "%s codec not supported\n",
- avcodec_get_name(par->codec_id));
- return AVERROR(EINVAL);
- }
-
if (par->ch_layout.nb_channels > 2) {
av_log(s, AV_LOG_ERROR, "KVAG files only support up to 2 channels\n");
return AVERROR(EINVAL);
@@ -190,7 +184,8 @@ const FFOutputFormat ff_kvag_muxer = {
.p.audio_codec = AV_CODEC_ID_ADPCM_IMA_SSI,
.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 = kvag_write_init,
.write_header = kvag_write_header,
.write_packet = ff_raw_write_packet,