mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-26 12:17:32 +00:00
cellVdec: Fix AU decode count on callback (#13342)
This commit is contained in:
parent
1cf8aacc11
commit
8652b7d358
@ -205,7 +205,7 @@ struct vdec_context final
|
||||
std::deque<vdec_frame> out_queue;
|
||||
const u32 out_max = 60;
|
||||
|
||||
atomic_t<u32> au_count{0};
|
||||
atomic_t<s32> au_count{0};
|
||||
|
||||
lf_queue<vdec_cmd> in_cmd;
|
||||
|
||||
@ -540,14 +540,11 @@ struct vdec_context final
|
||||
{
|
||||
// Send AUDONE even if the current sequence was reset and a new sequence was started.
|
||||
cellVdec.trace("Sending CELL_VDEC_MSG_TYPE_AUDONE (handle=0x%x, seq_id=%d, cmd_id=%d)", handle, cmd->seq_id, cmd->id);
|
||||
ensure(au_count.try_dec(0));
|
||||
|
||||
cb_func(ppu, vid, CELL_VDEC_MSG_TYPE_AUDONE, CELL_OK, cb_arg);
|
||||
lv2_obj::sleep(ppu);
|
||||
|
||||
if (au_count > 0)
|
||||
{
|
||||
--au_count;
|
||||
}
|
||||
|
||||
while (!decoded_frames.empty() && seq_id == cmd->seq_id)
|
||||
{
|
||||
// Wait until there is free space in the image queue.
|
||||
|
Loading…
Reference in New Issue
Block a user