Skip to content

Commit

Permalink
Explicit signal of end of process in external encoder. Fixes: #3029
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Apr 26, 2023
1 parent 4ea8e96 commit 765c427
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Fixed:
* Fixed non-monotonous PTS in ffmpeg raw content (#2978)
* Fixed external encoder (#3020)
* Fixed deadlock in `%external` encoder (#3029)

2.1.4 (2022-03-01)
=====
Expand Down
6 changes: 6 additions & 0 deletions src/encoder/external_encoder.ml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ let encoder id ext =
log#important "Error: %s" (Printexc.to_string e);
restart_decision ()
in
(* Signal end of process instead of always waiting
for zero read. See: https://lkml.indiana.edu/hypermail/linux/kernel/0106.0/0768.html *)
let on_stop v =
Condition.signal condition;
v
in
let log s = log#important "%s" s in
let on_stdout =
Tutils.mutexify mutex (fun puller ->
Expand Down

0 comments on commit 765c427

Please sign in to comment.