Fix #113: read buffer before waiting

This commit is contained in:
Paddy Xu
2017-11-06 20:09:01 +02:00
parent a2660fc15c
commit 0e5809120d
2 changed files with 3 additions and 2 deletions

View File

@@ -148,9 +148,9 @@ namespace QuickLook.Plugin.ImageViewer.Exiv2
p.StartInfo.Arguments = arg;
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
p.Start();
p.WaitForExit();
result = p.StandardOutput.ReadToEnd();
p.WaitForExit(1000);
}
return string.IsNullOrWhiteSpace(result)

View File

@@ -51,9 +51,10 @@ namespace QuickLook.Plugin.VideoViewer.FFmpeg
p.StartInfo.Arguments = $"-v quiet -print_format xml -show_streams -show_format \"{media}\"";
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
p.Start();
p.WaitForExit();
result = p.StandardOutput.ReadToEnd();
p.WaitForExit(1000);
}
if (string.IsNullOrWhiteSpace(result))