Small refactor to ensure that audio files have no image data - and allow videos below them to show through...

This commit is contained in:
Jonathan Thomas
2023-04-16 01:50:11 -05:00
parent b21a686b18
commit 89714b67b3
5 changed files with 23 additions and 15 deletions

View File

@@ -513,13 +513,13 @@ std::shared_ptr<Frame> FrameMapper::GetFrame(int64_t requested_frame)
// Copy the image from the odd field
std::shared_ptr<Frame> odd_frame = mapped_frame;
if (odd_frame)
if (odd_frame && odd_frame->has_image_data)
frame->AddImage(std::make_shared<QImage>(*odd_frame->GetImage()), true);
if (mapped.Odd.Frame != mapped.Even.Frame) {
// Add even lines (if different than the previous image)
std::shared_ptr<Frame> even_frame;
even_frame = GetOrCreateFrame(mapped.Even.Frame);
if (even_frame)
if (even_frame && even_frame->has_image_data)
frame->AddImage(std::make_shared<QImage>(*even_frame->GetImage()), false);
}