summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Danila Malyutin2023-07-18 03:01:49 +0400
committerGravatar Danila Malyutin2023-08-28 00:48:53 +0400
commit164f880f2385c8c7e3498286eebb9ef4782674c3 (patch)
tree7c43786b3b2716f780d5717b64734797f4261c87 /src
parentMerge pull request #11389 from FernandoS27/discard-fix (diff)
downloadyuzu-164f880f2385c8c7e3498286eebb9ef4782674c3.tar.gz
yuzu-164f880f2385c8c7e3498286eebb9ef4782674c3.tar.xz
yuzu-164f880f2385c8c7e3498286eebb9ef4782674c3.zip
Use initial_frame to check interlaced flag
If final frame was transferred from GPU, it won't carry the props. Fixes #11089
Diffstat (limited to '')
-rw-r--r--src/video_core/host1x/codecs/codec.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/host1x/codecs/codec.cpp b/src/video_core/host1x/codecs/codec.cpp
index 220cce28a..8d7da50fc 100644
--- a/src/video_core/host1x/codecs/codec.cpp
+++ b/src/video_core/host1x/codecs/codec.cpp
@@ -319,6 +319,7 @@ void Codec::Decode() {
319 LOG_WARNING(Service_NVDRV, "Zero width or height in frame"); 319 LOG_WARNING(Service_NVDRV, "Zero width or height in frame");
320 return; 320 return;
321 } 321 }
322 bool is_interlaced = initial_frame->interlaced_frame != 0;
322 if (av_codec_ctx->hw_device_ctx) { 323 if (av_codec_ctx->hw_device_ctx) {
323 final_frame = AVFramePtr{av_frame_alloc(), AVFrameDeleter}; 324 final_frame = AVFramePtr{av_frame_alloc(), AVFrameDeleter};
324 ASSERT_MSG(final_frame, "av_frame_alloc final_frame failed"); 325 ASSERT_MSG(final_frame, "av_frame_alloc final_frame failed");
@@ -334,7 +335,7 @@ void Codec::Decode() {
334 UNIMPLEMENTED_MSG("Unexpected video format: {}", final_frame->format); 335 UNIMPLEMENTED_MSG("Unexpected video format: {}", final_frame->format);
335 return; 336 return;
336 } 337 }
337 if (!final_frame->interlaced_frame) { 338 if (!is_interlaced) {
338 av_frames.push(std::move(final_frame)); 339 av_frames.push(std::move(final_frame));
339 } else { 340 } else {
340 if (!filters_initialized) { 341 if (!filters_initialized) {