瀏覽代碼

Overwrite supported codecs for livetv

Only changeing streamingRequest is not enough. The internal logic will do codec shifting based on supported codecs, need to overwrite all of them.

Signed-off-by: gnattu <gnattuoc@me.com>
gnattu 1 年之前
父節點
當前提交
4046ef1c13
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Jellyfin.Api/Helpers/StreamingHelpers.cs

+ 5 - 0
Jellyfin.Api/Helpers/StreamingHelpers.cs

@@ -154,6 +154,11 @@ public static class StreamingHelpers
                 // Some channels from HDHomerun will experience A/V sync issues
                 streamingRequest.SegmentContainer = "ts";
                 streamingRequest.VideoCodec = "h264";
+                streamingRequest.AudioCodec = "aac";
+                state.SupportedVideoCodecs = ["h264"];
+                state.Request.VideoCodec = "h264";
+                state.SupportedAudioCodecs = ["aac"];
+                state.Request.AudioCodec = "aac";
             }
 
             var liveStreamInfo = await mediaSourceManager.GetLiveStreamWithDirectStreamProvider(streamingRequest.LiveStreamId, cancellationToken).ConfigureAwait(false);