mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 22:11:26 +12:00
cellVdec: Remove irritating while loop
This commit is contained in:
parent
9f51003366
commit
7c65c1e3aa
1 changed files with 7 additions and 10 deletions
|
@ -388,15 +388,14 @@ struct vdec_context final
|
||||||
|
|
||||||
cellVdec.trace("AU decoding: size=0x%x, pts=0x%llx, dts=0x%llx, userdata=0x%llx", au_size, au_pts, au_dts, au_usrd);
|
cellVdec.trace("AU decoding: size=0x%x, pts=0x%llx, dts=0x%llx, userdata=0x%llx", au_size, au_pts, au_dts, au_usrd);
|
||||||
|
|
||||||
while (thread_ctrl::state() != thread_state::aborting && !abort_decode)
|
if (int ret = avcodec_send_packet(ctx, &packet); ret < 0)
|
||||||
|
{
|
||||||
|
char av_error[AV_ERROR_MAX_STRING_SIZE]{};
|
||||||
|
av_make_error_string(av_error, AV_ERROR_MAX_STRING_SIZE, ret);
|
||||||
|
fmt::throw_exception("AU queuing error(0x%x): %s", ret, av_error);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (int ret = avcodec_send_packet(ctx, &packet); ret < 0)
|
|
||||||
{
|
|
||||||
char av_error[AV_ERROR_MAX_STRING_SIZE]{};
|
|
||||||
av_make_error_string(av_error, AV_ERROR_MAX_STRING_SIZE, ret);
|
|
||||||
fmt::throw_exception("AU queuing error(0x%x): %s", ret, av_error);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (!abort_decode)
|
while (!abort_decode)
|
||||||
{
|
{
|
||||||
// Keep receiving frames
|
// Keep receiving frames
|
||||||
|
@ -555,8 +554,6 @@ struct vdec_context final
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thread_ctrl::state() != thread_state::aborting && !abort_decode)
|
if (thread_ctrl::state() != thread_state::aborting && !abort_decode)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue