aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/argo_asf.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/argo_asf.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/argo_asf.c')
-rw-r--r--libavformat/argo_asf.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/libavformat/argo_asf.c b/libavformat/argo_asf.c
index 28e3844394..61bfc6de1f 100644
--- a/libavformat/argo_asf.c
+++ b/libavformat/argo_asf.c
@@ -290,12 +290,6 @@ static int argo_asf_write_init(AVFormatContext *s)
ArgoASFMuxContext *ctx = s->priv_data;
const AVCodecParameters *par = s->streams[0]->codecpar;
- if (par->codec_id != AV_CODEC_ID_ADPCM_ARGO) {
- av_log(s, AV_LOG_ERROR, "%s codec not supported\n",
- avcodec_get_name(par->codec_id));
- return AVERROR(EINVAL);
- }
-
if (ctx->version_major == 1 && ctx->version_minor == 1 && par->sample_rate != 22050) {
av_log(s, AV_LOG_ERROR, "ASF v1.1 files only support a sample rate of 22050\n");
return AVERROR(EINVAL);
@@ -476,7 +470,8 @@ const FFOutputFormat ff_argo_asf_muxer = {
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
.p.priv_class = &argo_asf_muxer_class,
- .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 = argo_asf_write_init,
.write_header = argo_asf_write_header,
.write_packet = argo_asf_write_packet,