Skip to content

Commit e8b3036

Browse files
committed
fix initialization of threads_active in decoder context
i4_threads_active in the decoder context was not initialized correctly.
1 parent 87c991c commit e8b3036

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

decoder/impeg2d_api_main.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,6 +1677,7 @@ IV_API_CALL_STATUS_T impeg2d_api_init(iv_obj_t *ps_dechdl,
16771677
WORD32 i4_num_threads;
16781678
UWORD32 u4_share_disp_buf, u4_chroma_format;
16791679
UWORD32 u4_deinterlace;
1680+
WORD32 i4_threads_active;
16801681

16811682
ps_dec_init_ip = (impeg2d_init_ip_t *)ps_ip;
16821683
ps_dec_init_op = (impeg2d_init_op_t *)ps_op;
@@ -1708,6 +1709,15 @@ IV_API_CALL_STATUS_T impeg2d_api_init(iv_obj_t *ps_dechdl,
17081709
u4_deinterlace = 0;
17091710
}
17101711

1712+
if(ps_dec_init_ip->s_ivd_init_ip_t.u4_size > offsetof(impeg2d_init_ip_t, u4_keep_threads_active))
1713+
{
1714+
i4_threads_active = ps_dec_init_ip->u4_keep_threads_active;
1715+
}
1716+
else
1717+
{
1718+
i4_threads_active = 0;
1719+
}
1720+
17111721
if( (u4_chroma_format != IV_YUV_420P) &&
17121722
(u4_chroma_format != IV_YUV_420SP_UV) &&
17131723
(u4_chroma_format != IV_YUV_420SP_VU))
@@ -1956,6 +1966,7 @@ IV_API_CALL_STATUS_T impeg2d_api_init(iv_obj_t *ps_dechdl,
19561966
ps_dec_state->u2_vertical_size = u4_max_frm_height;
19571967
ps_dec_state->u4_share_disp_buf = u4_share_disp_buf;
19581968
ps_dec_state->u4_deinterlace = u4_deinterlace;
1969+
ps_dec_state->i4_threads_active = i4_threads_active;
19591970
ps_dec_state->ps_deint_pic = NULL;
19601971
}
19611972
}

0 commit comments

Comments
 (0)