Skip to content

Commit eb98c84

Browse files
Fix: late frame notification in audio session
Move the late frame notification callback to avoid returning zeroed epoch time to the caller.
1 parent 53309c0 commit eb98c84

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/src/st2110/st_tx_audio_session.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,14 @@ static int tx_audio_session_sync_pacing(struct mtl_main_impl* impl,
318318
if (to_epoch < 0) {
319319
/* time bigger than the assigned epoch time */
320320
ST_SESSION_STAT_INC(s, port_user_stats, stat_epoch_mismatch);
321+
if (s->ops.notify_frame_late) {
322+
s->ops.notify_frame_late(s->ops.priv, -to_epoch / pkt_time);
323+
}
321324
to_epoch = 0; /* send asap */
322325
}
323326

324327
if (epochs > next_epochs) {
325328
ST_SESSION_STAT_ADD(s, port_user_stats.common, stat_epoch_drop, -to_epoch / pkt_time);
326-
327-
if (s->ops.notify_frame_late) {
328-
s->ops.notify_frame_late(s->ops.priv, -to_epoch / pkt_time);
329-
}
330329
}
331330

332331
if (epochs < next_epochs) {

0 commit comments

Comments
 (0)