Skip to content
Merged
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
16 changes: 7 additions & 9 deletions playback/src/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1119,22 +1119,20 @@ impl PlayerTrackLoader {
})
};

let mut hint = Hint::new();
if let Some(mime_type) = AudioFiles::mime_type(format) {
hint.mime_type(mime_type);
}

#[cfg(feature = "passthrough-decoder")]
let decoder_type = if self.config.passthrough {
PassthroughDecoder::new(audio_file, format).map(|x| Box::new(x) as Decoder)
} else {
symphonia_decoder(audio_file, format)
symphonia_decoder(audio_file, hint)
};

#[cfg(not(feature = "passthrough-decoder"))]
let decoder_type = {
let mut hint = Hint::new();
if let Some(mime_type) = AudioFiles::mime_type(format) {
hint.mime_type(mime_type);
}

symphonia_decoder(audio_file, hint)
};
let decoder_type = { symphonia_decoder(audio_file, hint) };

let normalisation_data = normalisation_data.unwrap_or_else(|| {
warn!("Unable to get normalisation data, continuing with defaults.");
Expand Down