mirror of https://github.com/jellyfin/jellyfin.git
Move mp4 container names to class and use StringComparer.OrdinalIgnoreCase
This commit is contained in:
parent
42b4ef4529
commit
4a2245fe1e
|
@ -61,6 +61,16 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
"Main10"
|
"Main10"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private static readonly HashSet<string> _mp4ContainerNames = new(StringComparer.OrdinalIgnoreCase)
|
||||||
|
{
|
||||||
|
"mp4",
|
||||||
|
"m4a",
|
||||||
|
"m4p",
|
||||||
|
"m4b",
|
||||||
|
"m4r",
|
||||||
|
"m4v",
|
||||||
|
};
|
||||||
|
|
||||||
public EncodingHelper(
|
public EncodingHelper(
|
||||||
IApplicationPaths appPaths,
|
IApplicationPaths appPaths,
|
||||||
IMediaEncoder mediaEncoder,
|
IMediaEncoder mediaEncoder,
|
||||||
|
@ -5788,17 +5798,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
|
|
||||||
// Copy the movflags from GetProgressiveVideoFullCommandLine
|
// Copy the movflags from GetProgressiveVideoFullCommandLine
|
||||||
// See #9248 and the associated PR for why this is needed
|
// See #9248 and the associated PR for why this is needed
|
||||||
var mp4ContainerNames = new HashSet<string>
|
if (_mp4ContainerNames.Contains(state.OutputContainer))
|
||||||
{
|
|
||||||
"mp4",
|
|
||||||
"m4a",
|
|
||||||
"m4p",
|
|
||||||
"m4b",
|
|
||||||
"m4r",
|
|
||||||
"m4v",
|
|
||||||
};
|
|
||||||
|
|
||||||
if (mp4ContainerNames.Contains(state.OutputContainer.ToLower()))
|
|
||||||
{
|
{
|
||||||
audioTranscodeParams.Add("-movflags empty_moov+delay_moov");
|
audioTranscodeParams.Add("-movflags empty_moov+delay_moov");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue