Skip to content

Commit

Permalink
libavc : Fix mutex initialization index in apv_proc_start_mutex
Browse files Browse the repository at this point in the history
- Changed hardcoded index [0] to loop variable [i] in ithread_mutex_init call
- Ensures correct initialization of both mutexes in the loop

Test: ./avcdec

Change-Id: I95ccd1eec5f18b5391befbcedf3546a119681b54
  • Loading branch information
suyogpawar20 committed Oct 4, 2024
1 parent 42068b0 commit 78c1df7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decoder/ih264d_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,7 @@ WORD32 ih264d_allocate_static_bufs(iv_obj_t **dec_hdl, void *pv_api_ip, void *pv
ps_dec->apv_proc_done_mutex[i] =
(UWORD8 *)pv_buf + ((2 * i + 1) * mutex_size);

ret = ithread_mutex_init(ps_dec->apv_proc_start_mutex[0]);
ret = ithread_mutex_init(ps_dec->apv_proc_start_mutex[i]);
RETURN_IF((ret != IV_SUCCESS), ret);

ret = ithread_mutex_init(ps_dec->apv_proc_done_mutex[i]);
Expand Down

0 comments on commit 78c1df7

Please sign in to comment.