Browse Source

Lower the ffmpeg stop timeout duration

As this was, ffmpeg would continue to transcode video for timerDuration
seconds after stopping playback (i.e. returning to the menu). However,
this 60s timeout was a little obnoxious. Tested a 100ms timeout but
this ended up causing playback to constantly terminate. 2s seems like
the sweet spot where playback works normally, but terminating quickly
on stop.
Joshua Boniface 6 years ago
parent
commit
e5531c5c25
1 changed files with 3 additions and 0 deletions
  1. 3 0
      MediaBrowser.Api/ApiEntryPoint.cs

+ 3 - 0
MediaBrowser.Api/ApiEntryPoint.cs

@@ -421,12 +421,15 @@ namespace MediaBrowser.Api
                 return;
                 return;
             }
             }
 
 
+            /*
             var timerDuration = 10000;
             var timerDuration = 10000;
 
 
             if (job.Type != TranscodingJobType.Progressive)
             if (job.Type != TranscodingJobType.Progressive)
             {
             {
                 timerDuration = 60000;
                 timerDuration = 60000;
             }
             }
+            */
+            var timerDuration = 2000;
 
 
             job.PingTimeout = timerDuration;
             job.PingTimeout = timerDuration;
             job.LastPingDate = DateTime.UtcNow;
             job.LastPingDate = DateTime.UtcNow;