Skip to content

Commit

Permalink
fix: fixing slice video format
Browse files Browse the repository at this point in the history
  • Loading branch information
PanKaker committed Nov 8, 2024
1 parent 633afae commit b7afed7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/st2110/st_tx_video_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,7 +1793,11 @@ static int tv_tasklet_frame(struct mtl_main_impl* impl,
uint32_t offset = s->st20_pkt_len * (s->st20_pkt_idx + bulk);
line_number = offset / s->st20_bytes_in_line + 1;
}
if (line_number >= ops->height) line_number = ops->height - 1;

uint32_t height = ops->interlaced ? (ops->height >> 1) : ops->height;
if (line_number >= height) {
line_number = height - 1;
}
if (line_number >= s->st20_frame_lines_ready) {
struct st20_tx_slice_meta slice_meta;
memset(&slice_meta, 0, sizeof(slice_meta));
Expand Down

0 comments on commit b7afed7

Please sign in to comment.