Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 22 additions & 16 deletions src/rust/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,17 @@ impl OptionsExt for Options {
self.set_input_format_type(InFormat::Asf);
} else if args.wtv {
self.set_input_format_type(InFormat::Wtv);
} else if args.mp4 {
self.set_input_format_type(InFormat::Mp4);
} else if args.mkv {
self.set_input_format_type(InFormat::Mkv);
} else {
fatal!(
cause = ExitCause::MalformedParameter;
"Unknown input file format: {}\n", args.input.unwrap()
);
// fatal!(
// cause = ExitCause::MalformedParameter;
// "Unknown input file format: {}\n", args.input.map(|i| i.to_string()).unwrap_or_else(|| "Unknown".to_string())
// );

// No specific format flag matched, so we fall back to autodetection.
}
}

Expand Down Expand Up @@ -658,18 +664,18 @@ impl OptionsExt for Options {
self.timestamp_map = true;
}

if args.es
|| args.ts
|| args.ps
|| args.asf
|| args.wtv
|| args.mp4
|| args.mkv
|| args.dvr_ms
|| args.input.is_some()
{
self.set_input_format(args);
}
// if args.es
// || args.ts
// || args.ps
// || args.asf
// || args.wtv
// || args.mp4
// || args.mkv
// || args.dvr_ms
// || args.input.is_some()
// {
self.set_input_format(args);
// }

if let Some(ref codec) = args.codec {
match codec {
Expand Down
Loading