mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-11-09 22:14:59 +00:00
Set default audio codecs if none are specified
This commit is contained in:
parent
ca34a15cd3
commit
65e165af49
1 changed files with 10 additions and 4 deletions
|
@ -156,10 +156,13 @@ const fn webm_audio(
|
||||||
Some(WebmAudioCodec::Vorbis),
|
Some(WebmAudioCodec::Vorbis),
|
||||||
!matches!(provided, Some(WebmAudioCodec::Vorbis)),
|
!matches!(provided, Some(WebmAudioCodec::Vorbis)),
|
||||||
),
|
),
|
||||||
_ => (provided, false),
|
_ => match provided {
|
||||||
|
Some(codec) => (Some(codec), false),
|
||||||
|
None => (Some(WebmAudioCodec::Opus), true),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
(None, false)
|
(None, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,10 +178,13 @@ const fn mp4_audio(
|
||||||
Some(Mp4AudioCodec::Aac),
|
Some(Mp4AudioCodec::Aac),
|
||||||
!matches!(provided, Some(Mp4AudioCodec::Aac)),
|
!matches!(provided, Some(Mp4AudioCodec::Aac)),
|
||||||
),
|
),
|
||||||
_ => (provided, false),
|
_ => match provided {
|
||||||
|
Some(codec) => (Some(codec), false),
|
||||||
|
None => (Some(Mp4AudioCodec::Aac), true),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
(None, false)
|
(None, true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue