mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-10-11 22:49:55 +00:00
remove unnecessary #ifdef
This commit is contained in:
@@ -212,7 +212,6 @@ struct vdec_context final
|
||||
u32 frc_set{}; // Frame Rate Override
|
||||
u64 next_pts{};
|
||||
u64 next_dts{};
|
||||
u64 last_au_usrd{}; // Userdata of the last decoded AU, used for the drained pictures
|
||||
atomic_t<u32> ppu_tid{};
|
||||
|
||||
std::deque<vdec_frame> out_queue;
|
||||
@@ -275,10 +274,8 @@ struct vdec_context final
|
||||
fmt::throw_exception("avcodec_alloc_context3() failed (type=0x%x)", type);
|
||||
}
|
||||
|
||||
#ifdef AV_CODEC_FLAG_COPY_OPAQUE
|
||||
// Carry the AU userdata from each packet to the picture decoded from it, across the frame reordering
|
||||
ctx->flags |= AV_CODEC_FLAG_COPY_OPAQUE;
|
||||
#endif
|
||||
|
||||
AVDictionary* opts = nullptr;
|
||||
|
||||
@@ -419,7 +416,7 @@ struct vdec_context final
|
||||
const u32 au_size = cmd->au.size;
|
||||
const u64 au_pts = u64{cmd->au.pts.upper} << 32 | cmd->au.pts.lower;
|
||||
const u64 au_dts = u64{cmd->au.dts.upper} << 32 | cmd->au.dts.lower;
|
||||
au_usrd = drain ? last_au_usrd : cmd->au.userData.value();
|
||||
au_usrd = cmd->au.userData;
|
||||
|
||||
packet.data = vm::_ptr<u8>(au_addr);
|
||||
packet.size = au_size;
|
||||
@@ -454,8 +451,6 @@ struct vdec_context final
|
||||
fmt::throw_exception("AU queuing error (handle=0x%x, seq_id=%d, cmd_id=%d, error=0x%x): %s", handle, cmd->seq_id, cmd->id, ret, utils::av_error_to_string(ret));
|
||||
}
|
||||
|
||||
last_au_usrd = au_usrd;
|
||||
|
||||
while (!abort_decode && seq_id == cmd->seq_id)
|
||||
{
|
||||
// Keep receiving frames
|
||||
@@ -514,11 +509,7 @@ struct vdec_context final
|
||||
|
||||
frame.pts = next_pts;
|
||||
frame.dts = next_dts;
|
||||
#ifdef AV_CODEC_FLAG_COPY_OPAQUE
|
||||
frame.userdata = reinterpret_cast<u64>(frame->opaque);
|
||||
#else
|
||||
frame.userdata = au_usrd;
|
||||
#endif
|
||||
frame.attr = attr;
|
||||
|
||||
u64 amend = 0;
|
||||
|
||||
Reference in New Issue
Block a user