diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index 664735dfe..93ccd3cb2 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -779,18 +779,18 @@ namespace MediaBrowser.Api.Playback.Hls protected override string GetAudioArguments(StreamState state) { - var codec = EncodingHelper.GetAudioEncoder(state); + var audioCodec = EncodingHelper.GetAudioEncoder(state); if (!state.IsOutputVideo) { - if (string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(audioCodec, "copy", StringComparison.OrdinalIgnoreCase)) { return "-acodec copy"; } var audioTranscodeParams = new List(); - audioTranscodeParams.Add("-acodec " + codec); + audioTranscodeParams.Add("-acodec " + audioCodec); if (state.OutputAudioBitrate.HasValue) { @@ -811,12 +811,19 @@ namespace MediaBrowser.Api.Playback.Hls return string.Join(" ", audioTranscodeParams.ToArray()); } - if (string.Equals(codec, "copy", StringComparison.OrdinalIgnoreCase)) + if (string.Equals(audioCodec, "copy", StringComparison.OrdinalIgnoreCase)) { - return "-codec:a:0 copy -copypriorss:a:0 0"; + var videoCodec = EncodingHelper.GetVideoEncoder(state, ApiEntryPoint.Instance.GetEncodingOptions()); + + if (string.Equals(videoCodec, "copy", StringComparison.OrdinalIgnoreCase) && state.EnableBreakOnNonKeyFrames(videoCodec)) + { + return "-codec:a:0 copy -copypriorss:a:0 0"; + } + + return "-codec:a:0 copy"; } - var args = "-codec:a:0 " + codec; + var args = "-codec:a:0 " + audioCodec; var channels = state.OutputAudioChannels; diff --git a/SharedVersion.cs b/SharedVersion.cs index f7871ef69..0e07c788d 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.22.7")] +[assembly: AssemblyVersion("3.2.23.1")]