Skip to content

Commit 2eff949

Browse files
authored
Fix stalled pipe on Windows when using target quality (#596)
* Fix stalled pipe on Windows when using target quality (#551) I haven't seen any reports of this being an issue on Linux, so this will only affect Windows builds for the time being * fix formatting * fix formatting (again) gh actions should've let me off the hook for this silly oversight
1 parent a8b276c commit 2eff949

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

av1an-core/src/target_quality.rs

+15-3
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ impl<'a> TargetQuality<'a> {
187187
let mut source = if let [pipe_cmd, args @ ..] = &*chunk.source {
188188
tokio::process::Command::new(pipe_cmd)
189189
.args(args)
190-
.stderr(Stdio::piped())
190+
.stderr(if cfg!(windows) {
191+
Stdio::null()
192+
} else {
193+
Stdio::piped()
194+
})
191195
.stdout(Stdio::piped())
192196
.spawn()
193197
.unwrap()
@@ -202,7 +206,11 @@ impl<'a> TargetQuality<'a> {
202206
.args(args)
203207
.stdin(source_pipe_stdout)
204208
.stdout(Stdio::piped())
205-
.stderr(Stdio::piped())
209+
.stderr(if cfg!(windows) {
210+
Stdio::null()
211+
} else {
212+
Stdio::piped()
213+
})
206214
.spawn()
207215
.unwrap()
208216
} else {
@@ -216,7 +224,11 @@ impl<'a> TargetQuality<'a> {
216224
.args(args.iter().map(AsRef::as_ref))
217225
.stdin(source_pipe_stdout)
218226
.stdout(Stdio::piped())
219-
.stderr(Stdio::piped())
227+
.stderr(if cfg!(windows) {
228+
Stdio::null()
229+
} else {
230+
Stdio::piped()
231+
})
220232
.spawn()
221233
.unwrap()
222234
} else {

0 commit comments

Comments
 (0)