aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/Playback
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/Playback')
-rw-r--r--MediaBrowser.Api/Playback/BaseStreamingService.cs14
-rw-r--r--MediaBrowser.Api/Playback/StreamState.cs3
2 files changed, 17 insertions, 0 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 3993866cf5..e1f4799f18 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -1358,6 +1358,8 @@ namespace MediaBrowser.Api.Playback
state.ReadInputAtNativeFramerate = recording.RecordingInfo.Status == RecordingStatus.InProgress;
state.AudioSync = "1000";
state.DeInterlace = true;
+ state.InputVideoSync = "-1";
+ state.InputAudioSync = "1";
}
else if (item is LiveTvChannel)
{
@@ -1387,6 +1389,8 @@ namespace MediaBrowser.Api.Playback
state.ReadInputAtNativeFramerate = true;
state.AudioSync = "1000";
state.DeInterlace = true;
+ state.InputVideoSync = "-1";
+ state.InputAudioSync = "1";
}
else
{
@@ -1503,6 +1507,16 @@ namespace MediaBrowser.Api.Playback
inputModifier += " -acodec " + state.InputAudioCodec;
}
+ if (!string.IsNullOrEmpty(state.InputAudioSync))
+ {
+ inputModifier += " -async " + state.InputAudioSync;
+ }
+
+ if (!string.IsNullOrEmpty(state.InputVideoSync))
+ {
+ inputModifier += " -vsync " + state.InputVideoSync;
+ }
+
if (state.ReadInputAtNativeFramerate)
{
inputModifier += " -re";
diff --git a/MediaBrowser.Api/Playback/StreamState.cs b/MediaBrowser.Api/Playback/StreamState.cs
index 961ac0a2a2..88daf9f623 100644
--- a/MediaBrowser.Api/Playback/StreamState.cs
+++ b/MediaBrowser.Api/Playback/StreamState.cs
@@ -64,6 +64,9 @@ namespace MediaBrowser.Api.Playback
public string AudioSync = "1";
public string VideoSync = "vfr";
+ public string InputAudioSync { get; set; }
+ public string InputVideoSync { get; set; }
+
public bool DeInterlace { get; set; }
public bool ReadInputAtNativeFramerate { get; set; }