Skip to content

Commit 0e58091

Browse files
committed
Fix #113: read buffer before waiting
1 parent a2660fc commit 0e58091

File tree

2 files changed

+3
-2
lines changed
  • QuickLook.Plugin
    • QuickLook.Plugin.ImageViewer/exiv2
    • QuickLook.Plugin.VideoViewer/ffmpeg

2 files changed

+3
-2
lines changed

QuickLook.Plugin/QuickLook.Plugin.ImageViewer/exiv2/Meta.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ private Dictionary<string, string> Run(string arg, string regexSplit)
148148
p.StartInfo.Arguments = arg;
149149
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
150150
p.Start();
151-
p.WaitForExit();
152151

153152
result = p.StandardOutput.ReadToEnd();
153+
p.WaitForExit(1000);
154154
}
155155

156156
return string.IsNullOrWhiteSpace(result)

QuickLook.Plugin/QuickLook.Plugin.VideoViewer/ffmpeg/FFprobe.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ private bool Run(string media)
5151
p.StartInfo.Arguments = $"-v quiet -print_format xml -show_streams -show_format \"{media}\"";
5252
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;
5353
p.Start();
54-
p.WaitForExit();
5554

5655
result = p.StandardOutput.ReadToEnd();
56+
p.WaitForExit(1000);
57+
5758
}
5859

5960
if (string.IsNullOrWhiteSpace(result))

0 commit comments

Comments
 (0)