Skip to content

Commit d576650

Browse files
committed
EACDemuxer: use readStream before WaitForExit to avoid a deadlock when reading a stream synchronously.
Otherwise if the child process writes a large amount of text, the child process will wait indefinitely for the parent process to read the stream, while the parent process will wait indefinitely for the child process to exit.
1 parent 60049ab commit d576650

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

OKEGui/OKEGui/JobProcessor/Demuxer/EACDemuxer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ private void StartEac(string arguments, bool asyncRead)
126126
}
127127
else
128128
{
129-
proc.WaitForExit();
130129
readStream(proc.StandardOutput);
130+
proc.WaitForExit();
131131
}
132132
}
133133
catch (Exception e) { throw e; }

0 commit comments

Comments
 (0)