mirror of https://github.com/jellyfin/jellyfin.git
Apply suggestions from code review
Co-authored-by: BaronGreenback <jimcartlidge@yahoo.co.uk>
This commit is contained in:
parent
fc89b7e641
commit
06670351ae
|
@ -1453,7 +1453,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
|| string.Equals(state.MediaSource.Container, "hls", StringComparison.OrdinalIgnoreCase)))
|
|| string.Equals(state.MediaSource.Container, "hls", StringComparison.OrdinalIgnoreCase)))
|
||||||
{
|
{
|
||||||
bitStreamArgs = _encodingHelper.GetBitStreamArgs(state.AudioStream);
|
bitStreamArgs = _encodingHelper.GetBitStreamArgs(state.AudioStream);
|
||||||
bitStreamArgs = !string.IsNullOrEmpty(bitStreamArgs) ? " " + bitStreamArgs : string.Empty;
|
bitStreamArgs = string.IsNullOrEmpty(bitStreamArgs) ? string.Empty : " " + bitStreamArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "-acodec copy -strict -2" + bitStreamArgs;
|
return "-acodec copy -strict -2" + bitStreamArgs;
|
||||||
|
@ -1494,7 +1494,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
|| string.Equals(state.MediaSource.Container, "hls", StringComparison.OrdinalIgnoreCase)))
|
|| string.Equals(state.MediaSource.Container, "hls", StringComparison.OrdinalIgnoreCase)))
|
||||||
{
|
{
|
||||||
bitStreamArgs = _encodingHelper.GetBitStreamArgs(state.AudioStream);
|
bitStreamArgs = _encodingHelper.GetBitStreamArgs(state.AudioStream);
|
||||||
bitStreamArgs = !string.IsNullOrEmpty(bitStreamArgs) ? " " + bitStreamArgs : string.Empty;
|
bitStreamArgs = string.IsNullOrEmpty(bitStreamArgs) ? string.Empty : " " + bitStreamArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EncodingHelper.IsCopyCodec(videoCodec) && state.EnableBreakOnNonKeyFrames(videoCodec))
|
if (EncodingHelper.IsCopyCodec(videoCodec) && state.EnableBreakOnNonKeyFrames(videoCodec))
|
||||||
|
|
|
@ -448,7 +448,7 @@ namespace Jellyfin.Api.Controllers
|
||||||
|| string.Equals(state.MediaSource.Container, "hls", StringComparison.OrdinalIgnoreCase)))
|
|| string.Equals(state.MediaSource.Container, "hls", StringComparison.OrdinalIgnoreCase)))
|
||||||
{
|
{
|
||||||
bitStreamArgs = _encodingHelper.GetBitStreamArgs(state.AudioStream);
|
bitStreamArgs = _encodingHelper.GetBitStreamArgs(state.AudioStream);
|
||||||
bitStreamArgs = !string.IsNullOrEmpty(bitStreamArgs) ? " " + bitStreamArgs : string.Empty;
|
bitStreamArgs = string.IsNullOrEmpty(bitStreamArgs) ? string.Empty : " " + bitStreamArgs;;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "-acodec copy -strict -2" + bitStreamArgs;
|
return "-acodec copy -strict -2" + bitStreamArgs;
|
||||||
|
|
|
@ -605,7 +605,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
|
|
||||||
public string GetBitStreamArgs(MediaStream stream)
|
public string GetBitStreamArgs(MediaStream stream)
|
||||||
{
|
{
|
||||||
// TODO This is auto inserted into the mpegts mux so it might not be needed
|
// TODO This is auto inserted into the mpegts mux so it might not be needed.
|
||||||
// https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#h264_005fmp4toannexb
|
// https://www.ffmpeg.org/ffmpeg-bitstream-filters.html#h264_005fmp4toannexb
|
||||||
if (IsH264(stream))
|
if (IsH264(stream))
|
||||||
{
|
{
|
||||||
|
@ -617,7 +617,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
}
|
}
|
||||||
else if (IsAAC(stream))
|
else if (IsAAC(stream))
|
||||||
{
|
{
|
||||||
// convert adts header(mpegts) to asc header(mp4)
|
// Convert adts header(mpegts) to asc header(mp4).
|
||||||
return "-bsf:a aac_adtstoasc";
|
return "-bsf:a aac_adtstoasc";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue