Skip to content

Commit

Permalink
Add debugging log.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Oct 14, 2024
1 parent 61d12cd commit fb7d36d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/core/source.ml
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,12 @@ class virtual generate_from_multiple_sources ~merge ~track_sensitive () =
| Some s when last_source == s ->
let remainder =
s#get_partial_frame (fun frame ->
assert (last_chunk_pos < Frame.position frame);
if Frame.position frame <= last_chunk_pos then (
self#log#critical
"Source %s was re-selected but did not produce \
enough data: %d <! %d"
s#id (Frame.position frame) last_chunk_pos;
assert false);
Frame.slice frame (last_chunk_pos + rem))
in
let new_track = Frame.after remainder last_chunk_pos in
Expand All @@ -651,7 +656,9 @@ class virtual generate_from_multiple_sources ~merge ~track_sensitive () =
f ~last_source ~last_chunk:remainder
(Frame.append buf new_track)
| Some s ->
assert s#is_ready;
if not s#is_ready then (
self#log#critical "Underlying source %s is not ready!" s#id;
assert false);
let new_track =
s#get_partial_frame (fun frame ->
match self#split_frame frame with
Expand Down

0 comments on commit fb7d36d

Please sign in to comment.