From 37f0dbbc3911d315e12478535dcc7ea138d000ad Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 19 Mar 2024 23:44:16 +0100 Subject: avformat: Enforce codec_id where appropriate 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 --- libavformat/mmf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat/mmf.c') 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, -- cgit v1.2.3