From acc5d9847c8f6c940b30cc18a767884e4b2e5aeb Mon Sep 17 00:00:00 2001
From: sr55 <sr55.hb@outlook.com>
Date: Fri, 9 Sep 2016 22:29:27 +0100
Subject: [PATCH] WinGui: Fix #318  Video Previews can start at the beginning
 of the file, but the first preview is a little bit inside the file. So
 StartAtPreview indexes are out by 1.

---
 win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
index 09d27d029..70ad9f71e 100644
--- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs
@@ -558,7 +558,7 @@ namespace HandBrakeWPF.ViewModels
 
             // Setup the encode task as a preview encode
             encodeTask.IsPreviewEncode = true;
-            encodeTask.PreviewEncodeStartAt = this.SelectedPreviewImage;  // TODO 0 and 1 mean the same. Need to fix this as it knocks the video out of sync with the still preview.
+            encodeTask.PreviewEncodeStartAt = this.SelectedPreviewImage +1;  
             encodeTask.PreviewEncodeDuration = this.Duration;
             QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create(), this.ScannedSource.ScanPath);
             ThreadPool.QueueUserWorkItem(this.CreatePreview, task);
-- 
2.40.0