mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 18:10:13 +01:00
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>
This commit is contained in:
@@ -44,6 +44,8 @@ int avformat_query_codec(const AVOutputFormat *ofmt, enum AVCodecID codec_id,
|
||||
codec_id == ofmt->audio_codec ||
|
||||
codec_id == ofmt->subtitle_codec))
|
||||
return 1;
|
||||
else if (ffofmt(ofmt)->flags_internal & FF_OFMT_FLAG_ONLY_DEFAULT_CODECS)
|
||||
return 0;
|
||||
else if (ffofmt(ofmt)->flags_internal & FF_OFMT_FLAG_MAX_ONE_OF_EACH) {
|
||||
enum AVMediaType type = avcodec_get_type(codec_id);
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user