From 59efa7222b7c2faf5c4b91b58df6e306578f153a Mon Sep 17 00:00:00 2001 From: Christian Feldmann Date: Mon, 22 Feb 2021 17:02:03 +0100 Subject: [PATCH 1/2] Warning fix --- YUViewLib/src/filesource/FileSourceFFmpegFile.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/YUViewLib/src/filesource/FileSourceFFmpegFile.cpp b/YUViewLib/src/filesource/FileSourceFFmpegFile.cpp index d05b20110..1e5bf1be9 100644 --- a/YUViewLib/src/filesource/FileSourceFFmpegFile.cpp +++ b/YUViewLib/src/filesource/FileSourceFFmpegFile.cpp @@ -375,17 +375,14 @@ std::pair FileSourceFFmpegFile::getClosestSeekableFrameBefore(i for (const auto &pic : this->keyFrameList) { - if (pic.frame >= 0) + if (frameIdx > 0 && pic.frame <= unsigned(frameIdx)) { - if (frameIdx > 0 && pic.frame <= unsigned(frameIdx)) - { - // We could seek here - bestSeekDTS = pic.dts; - seekToFrameIdx = pic.frame; - } - else - break; + // We could seek here + bestSeekDTS = pic.dts; + seekToFrameIdx = pic.frame; } + else + break; } return {bestSeekDTS, seekToFrameIdx}; From 903e307c8317c2ed4b8a1eb4d753df93240553f8 Mon Sep 17 00:00:00 2001 From: Christian Feldmann Date: Mon, 22 Feb 2021 17:02:26 +0100 Subject: [PATCH 2/2] wrong settings name --- YUViewLib/src/decoder/decoderVVDec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/YUViewLib/src/decoder/decoderVVDec.cpp b/YUViewLib/src/decoder/decoderVVDec.cpp index d69f9f633..d44795468 100644 --- a/YUViewLib/src/decoder/decoderVVDec.cpp +++ b/YUViewLib/src/decoder/decoderVVDec.cpp @@ -108,7 +108,7 @@ decoderVVDec::decoderVVDec(int signalID, bool cachingDecoder) // Try to load the decoder library (.dll on Windows, .so on Linux, .dylib on Mac) QSettings settings; settings.beginGroup("Decoders"); - this->loadDecoderLibrary(settings.value("libvvdecFile", "").toString()); + this->loadDecoderLibrary(settings.value("libVVDecFile", "").toString()); settings.endGroup(); if (this->decoderState != DecoderState::Error) @@ -378,7 +378,7 @@ void decoderVVDec::copyImgToByteArray(QByteArray &dst) { auto bitDepthU = this->lib.libvvdec_get_picture_bit_depth(this->decoder, LIBvvdec_CHROMA_U); auto bitDepthV = this->lib.libvvdec_get_picture_bit_depth(this->decoder, LIBvvdec_CHROMA_V); - if ((outputTwoByte != bitDepthU > 8) || (outputTwoByte != bitDepthV > 8)) + if ((outputTwoByte != (bitDepthU > 8)) || (outputTwoByte != (bitDepthV > 8))) { DEBUG_vvdec("decoderVVDec::copyImgToByteArray different bit depth in YUV components. This " "is not supported.");