mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-12 10:47:31 +02:00
fix(download): normalize MP4 audio extension by codec (#512)
This commit is contained in:
1 parent
4693e2f1d2
commit
5374883875
6 files changed
+146
-13
No files matched your search
@@ -118,6 +118,14 @@ String? normalizeAudioFormatValue(String? value) {
|
||||
};
|
||||
}
|
||||
|
||||
/// Chooses the user-facing extension for an audio-only ISO-BMFF container.
|
||||
/// AC-4 stays `.mp4` because its compatibility repair and passthrough path
|
||||
/// depend on that container identity; other audio codecs use the conventional
|
||||
/// `.m4a` extension, including Opus and E-AC-3 streams carried inside MP4.
|
||||
String isoBmffAudioExtensionForCodec(String? codec) {
|
||||
return normalizeAudioFormatValue(codec) == 'ac4' ? '.mp4' : '.m4a';
|
||||
}
|
||||
|
||||
/// Resolves the actual audio codec reported by native metadata probing, while
|
||||
/// falling back to the container format when the codec is absent or generic.
|
||||
///
|
||||
|
||||
Reference in new issue
Block a user