Skip to content

Commit

Permalink
Fix the last frame drop in ST22
Browse files Browse the repository at this point in the history
In ST22, ensure the frame status changes to FREE
at the end of transmitting the last frame.
This change addresses the issue of the last frame
sometimes being omitted in ST22 streams.
  • Loading branch information
DawidWesierski4 committed Jul 30, 2024
1 parent ed9e244 commit b1dfd11
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/src/st2110/pipeline/st22_pipeline_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,10 +594,12 @@ static void tx_st22p_framebuffs_flush(struct st22p_tx_ctx* ctx) {
while (1) {
if (framebuff->stat == ST22P_TX_FRAME_FREE) break;
if (framebuff->stat == ST22P_TX_FRAME_IN_TRANSMITTING) {
/* make sure transport to finish the transmit */
/* WA to use sleep here, todo: add a transport API to query the stat */
/*
* make sure to wait when the frame is in transmit
* without we will stop before encoder takes the frame
* WA to use sleep here, todo: add a transport API to query the stat
*/
mt_sleep_ms(50);
break;
}

dbg("%s(%d), frame %u are still in %s, retry %d\n", __func__, ctx->idx, i,
Expand Down

0 comments on commit b1dfd11

Please sign in to comment.