ignore muxed as a private data stream warning, validate channel count
This commit is contained in:
parent
70213b5d64
commit
6149288d2f
@ -107,20 +107,26 @@ fn main() {
|
|||||||
exit(1);
|
exit(1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ![2, 4, 6, 8].contains(&config.processing.audio_channels) {
|
||||||
|
error!(
|
||||||
|
"Encoding {} channel(s) is not allowed. Only 2, 4, 6 and 8 channels are supported!",
|
||||||
|
config.processing.audio_channels
|
||||||
|
);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
if config.general.generate.is_some() {
|
if config.general.generate.is_some() {
|
||||||
// run a simple playlist generator and save them to disk
|
// run a simple playlist generator and save them to disk
|
||||||
if let Err(e) = generate_playlist(&config, None) {
|
if let Err(e) = generate_playlist(&config, None) {
|
||||||
error!("{e}");
|
error!("{e}");
|
||||||
exit(1);
|
exit(1);
|
||||||
};
|
};
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(path) = args.import {
|
if let Some(path) = args.import {
|
||||||
if args.date.is_none() {
|
if args.date.is_none() {
|
||||||
error!("Import needs date parameter!");
|
error!("Import needs date parameter!");
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,8 +19,9 @@ pub const IMAGE_FORMAT: [&str; 21] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// Some well known errors can be safely ignore
|
// Some well known errors can be safely ignore
|
||||||
pub const FFMPEG_IGNORE_ERRORS: [&str; 9] = [
|
pub const FFMPEG_IGNORE_ERRORS: [&str; 10] = [
|
||||||
"ac-tex damaged",
|
"ac-tex damaged",
|
||||||
|
"codec s302m, is muxed as a private data stream",
|
||||||
"corrupt decoded frame in stream",
|
"corrupt decoded frame in stream",
|
||||||
"corrupt input packet in stream",
|
"corrupt input packet in stream",
|
||||||
"end mismatch left",
|
"end mismatch left",
|
||||||
@ -160,7 +161,7 @@ pub struct Processing {
|
|||||||
#[serde(default = "default_tracks")]
|
#[serde(default = "default_tracks")]
|
||||||
pub audio_tracks: i32,
|
pub audio_tracks: i32,
|
||||||
#[serde(default = "default_channels")]
|
#[serde(default = "default_channels")]
|
||||||
pub audio_channels: i32,
|
pub audio_channels: u8,
|
||||||
pub add_loudnorm: bool,
|
pub add_loudnorm: bool,
|
||||||
pub loudnorm_ingest: bool,
|
pub loudnorm_ingest: bool,
|
||||||
pub loud_i: f32,
|
pub loud_i: f32,
|
||||||
@ -248,7 +249,7 @@ fn default_tracks() -> i32 {
|
|||||||
1
|
1
|
||||||
}
|
}
|
||||||
|
|
||||||
fn default_channels() -> i32 {
|
fn default_channels() -> u8 {
|
||||||
2
|
2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user