add session reporting error handling

This commit is contained in:
Luke Pulverenti
2017-07-12 14:54:46 -04:00
parent a238556202
commit b8d4ef5fc6
3 changed files with 25 additions and 1 deletions

View File

@@ -75,6 +75,16 @@ namespace MediaBrowser.Api.Playback.Hls
/// <returns>System.String.</returns>
protected override string GetVideoArguments(StreamState state)
{
if (!state.IsOutputVideo)
{
return string.Empty;
}
// No known video stream
if (state.VideoStream == null)
{
return string.Empty;
}
var codec = EncodingHelper.GetVideoEncoder(state, ApiEntryPoint.Instance.GetEncodingOptions());
var args = "-codec:v:0 " + codec;