record IsAvc

This commit is contained in:
Luke Pulverenti
2016-04-27 15:23:05 -04:00
parent 92bdbe22b4
commit dfa2557874
6 changed files with 74 additions and 5 deletions

View File

@@ -288,9 +288,9 @@ namespace MediaBrowser.Api.Playback
{
if (string.Equals(ApiEntryPoint.Instance.GetEncodingOptions().HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase))
{
return "h264_qsv";
return "h264_qsv";
}
return "libx264";
@@ -1804,6 +1804,15 @@ namespace MediaBrowser.Api.Playback
}
}
if (string.Equals("h264", videoStream.Codec, StringComparison.OrdinalIgnoreCase))
{
if (videoStream.IsAVC.HasValue && !videoStream.IsAVC.Value)
{
Logger.Debug("Cannot stream copy video. Stream is marked as not AVC");
return false;
}
}
// Source and target codecs must match
if (!string.Equals(request.VideoCodec, videoStream.Codec, StringComparison.OrdinalIgnoreCase))
{