diff options
author | sr55 <[email protected]> | 2015-01-25 19:46:56 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-01-25 19:46:56 +0000 |
commit | 9545f5c9b6c3160b0e6cba9344232cb9e1493aaf (patch) | |
tree | 03aaf141b588c92dd0796d3f272cb5dd09775949 /win | |
parent | 2f061ec629aaf35dd2e119a859da0cb6c29b0ca3 (diff) |
WinGui: Fix a object reference issue with the ScannedSource in the QueueTask object. This could lead to queue encode failures.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6815 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
4 files changed, 10 insertions, 10 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs index 2f223d97b..366f5b4e6 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/QueueTask.cs @@ -47,21 +47,21 @@ namespace HandBrake.ApplicationServices.Model /// <param name="configuration">
/// The configuration.
/// </param>
- /// <param name="scannedSource">
- /// The scanned Source.
+ /// <param name="scannedSourcePath">
+ /// The scanned Source Path.
/// </param>
- public QueueTask(EncodeTask task, HBConfiguration configuration, Source scannedSource)
+ public QueueTask(EncodeTask task, HBConfiguration configuration, string scannedSourcePath)
{
this.Task = task;
this.Configuration = configuration;
this.Status = QueueItemStatus.Waiting;
- this.ScannedSource = scannedSource;
+ this.ScannedSourcePath = scannedSourcePath;
}
/// <summary>
/// Gets or sets ScannedSource.
/// </summary>
- public Source ScannedSource { get; set; }
+ public string ScannedSourcePath { get; set; }
/// <summary>
/// Gets or sets Status.
@@ -103,7 +103,7 @@ namespace HandBrake.ApplicationServices.Model /// </returns>
protected bool Equals(QueueTask other)
{
- return Equals(this.ScannedSource, other.ScannedSource) && Equals(this.Task, other.Task) && this.status == other.status;
+ return Equals(this.ScannedSourcePath, other.ScannedSourcePath) && Equals(this.Task, other.Task) && this.status == other.status;
}
/// <summary>
@@ -145,7 +145,7 @@ namespace HandBrake.ApplicationServices.Model {
unchecked
{
- int hashCode = (this.ScannedSource != null ? this.ScannedSource.GetHashCode() : 0);
+ int hashCode = (this.ScannedSourcePath != null ? this.ScannedSourcePath.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (this.Task != null ? this.Task.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (int)this.status;
return hashCode;
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs index 942644f2e..42f72f509 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/LibEncode.cs @@ -138,7 +138,7 @@ namespace HandBrake.ApplicationServices.Services.Encode ServiceLogMessage("Scanning title for encoding ... ");
- this.instance.StartScan(job.ScannedSource.ScanPath, job.Configuration.PreviewScanCount, job.Task.Title);
+ this.instance.StartScan(job.ScannedSourcePath, job.Configuration.PreviewScanCount, job.Task.Title);
}
catch (Exception exc)
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 48bf428f9..6eff64259 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1229,7 +1229,7 @@ namespace HandBrakeWPF.ViewModels return false;
}
- QueueTask task = new QueueTask(new EncodeTask(this.CurrentTask), HBConfigurationFactory.Create(), this.ScannedSource);
+ QueueTask task = new QueueTask(new EncodeTask(this.CurrentTask), HBConfigurationFactory.Create(), this.ScannedSource.ScanPath);
if (!this.queueProcessor.CheckForDestinationPathDuplicates(task.Task.Destination))
{
diff --git a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs index 452db5cc8..a00a3dcca 100644 --- a/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/StaticPreviewViewModel.cs @@ -553,7 +553,7 @@ namespace HandBrakeWPF.ViewModels 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.PreviewEncodeDuration = this.Duration;
- QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create(), this.ScannedSource);
+ QueueTask task = new QueueTask(encodeTask, HBConfigurationFactory.Create(), this.ScannedSource.ScanPath);
ThreadPool.QueueUserWorkItem(this.CreatePreview, task);
}
|