From f55b138e1dab42ef691374f872ff22ee3b947f55 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 27 Sep 2017 10:52:01 -0400 Subject: update deinterlace param --- MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs') diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs index 450bbf7c1..cf067ddf4 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs @@ -161,7 +161,7 @@ namespace MediaBrowser.Controller.MediaEncoding public int? OutputAudioBitrate; public int? OutputAudioChannels; - public bool DeInterlace(string videoCodec) + public bool DeInterlace(string videoCodec, bool forceDeinterlaceIfSourceIsInterlaced) { // Support general param if (BaseRequest.DeInterlace) @@ -177,6 +177,15 @@ namespace MediaBrowser.Controller.MediaEncoding } } + if (forceDeinterlaceIfSourceIsInterlaced) + { + var videoStream = VideoStream; + if (videoStream != null && videoStream.IsInterlaced) + { + return true; + } + } + return false; } @@ -559,7 +568,7 @@ namespace MediaBrowser.Controller.MediaEncoding return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced; } - if (DeInterlace(ActualOutputVideoCodec)) + if (DeInterlace(ActualOutputVideoCodec, true)) { return false; } -- cgit v1.2.3