Skip to content

Commit

Permalink
Fix end of stream not properly being called when not streaming.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jan 1, 2025
1 parent b3ee4dc commit ebaf1c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/core/encoder/encoders/ogg_encoder.ml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ let encoder ~pos { Ogg_format.audio; video } =
and ogg_stop () =
let f track = track.id <- None in
List.iter f tracks;
if Ogg_muxer.state ogg_enc = Ogg_muxer.Streaming then
Ogg_muxer.end_of_stream ogg_enc
Ogg_muxer.end_of_stream ogg_enc
and stop () =
ogg_stop ();
Ogg_muxer.get_data ogg_enc
Expand Down
4 changes: 1 addition & 3 deletions src/core/ogg_formats/ogg_muxer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ let register_track ?fill encoder track_encoder =

(** Start streams, set state to Streaming. *)
let streams_start encoder =
if Hashtbl.length encoder.tracks = 0 then
log#info "%s: Starting stream with no ogg track.." encoder.id;
log#info "%s: Starting all streams" encoder.id;
log#info "%s: Starting %d tracks" encoder.id (Hashtbl.length encoder.tracks);

(* Add skeleton information first. *)
begin
Expand Down

0 comments on commit ebaf1c7

Please sign in to comment.