aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/vc1testenc.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/vc1testenc.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/vc1testenc.c')
-rw-r--r--libavformat/vc1testenc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
index 6b4cbd1152..40d764c4de 100644
--- a/libavformat/vc1testenc.c
+++ b/libavformat/vc1testenc.c
@@ -31,10 +31,6 @@ static int vc1test_write_header(AVFormatContext *s)
AVCodecParameters *par = s->streams[0]->codecpar;
AVIOContext *pb = s->pb;
- if (par->codec_id != AV_CODEC_ID_WMV3) {
- av_log(s, AV_LOG_ERROR, "Only WMV3 is accepted!\n");
- return -1;
- }
avio_wl24(pb, 0); //frames count will be here
avio_w8(pb, 0xC5);
avio_wl32(pb, 4);
@@ -92,5 +88,6 @@ const FFOutputFormat ff_vc1t_muxer = {
.write_header = vc1test_write_header,
.write_packet = vc1test_write_packet,
.write_trailer = vc1test_write_trailer,
- .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
+ .flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH |
+ FF_OFMT_FLAG_ONLY_DEFAULT_CODECS,
};