update probing

pull/702/head
Luke Pulverenti 9 years ago
parent 04d480297d
commit a363beb23c

@ -1203,7 +1203,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
public int? ExitCode; public int? ExitCode;
private readonly MediaEncoder _mediaEncoder; private readonly MediaEncoder _mediaEncoder;
private readonly ILogger _logger; private readonly ILogger _logger;
public bool IsRedirectingStdin { get; set; } public bool IsRedirectingStdin { get; private set; }
public ProcessWrapper(Process process, MediaEncoder mediaEncoder, ILogger logger, bool isRedirectingStdin) public ProcessWrapper(Process process, MediaEncoder mediaEncoder, ILogger logger, bool isRedirectingStdin)
{ {
@ -1224,7 +1224,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
{ {
ExitCode = process.ExitCode; ExitCode = process.ExitCode;
} }
catch (Exception ex) catch
{ {
} }
@ -1233,11 +1233,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
_mediaEncoder._runningProcesses.Remove(this); _mediaEncoder._runningProcesses.Remove(this);
} }
DisposeProcess(process);
}
private void DisposeProcess(Process process)
{
try try
{ {
process.Dispose(); process.Dispose();
} }
catch (Exception ex) catch
{ {
} }
} }
@ -1253,7 +1258,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
if (Process != null) if (Process != null)
{ {
Process.Exited -= Process_Exited; Process.Exited -= Process_Exited;
Process.Dispose(); DisposeProcess(Process);
} }
} }

Loading…
Cancel
Save