Mark CC subtitle track as CC & grab normal subtitles and CC when using -m audio (#141)

This commit is contained in:
ByteDream 2023-04-17 18:14:54 +02:00
parent c0e2df4804
commit 847c6a1abc
4 changed files with 38 additions and 26 deletions

View file

@ -301,7 +301,7 @@ pub struct Format {
impl Format {
pub fn from_single_formats(
mut single_formats: Vec<(SingleFormat, VariantData, Vec<Subtitle>)>,
mut single_formats: Vec<(SingleFormat, VariantData, Vec<(Subtitle, bool)>)>,
) -> Self {
let locales: Vec<(Locale, Vec<Locale>)> = single_formats
.iter()
@ -310,7 +310,7 @@ impl Format {
single_format.audio.clone(),
subtitles
.into_iter()
.map(|s| s.locale.clone())
.map(|(s, _)| s.locale.clone())
.collect::<Vec<Locale>>(),
)
})