From 2cc1333ab31d1ae7f81b61c71d5e99a26aeca8f0 Mon Sep 17 00:00:00 2001 From: ChristianFeldmann Date: Mon, 8 Jul 2024 22:41:03 +0200 Subject: [PATCH] Set decoder status to error if ffmpeg libraries can not be loaded. --- YUViewLib/src/decoder/decoderFFmpeg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/YUViewLib/src/decoder/decoderFFmpeg.cpp b/YUViewLib/src/decoder/decoderFFmpeg.cpp index 89c0ec69e..d6d88de41 100644 --- a/YUViewLib/src/decoder/decoderFFmpeg.cpp +++ b/YUViewLib/src/decoder/decoderFFmpeg.cpp @@ -58,7 +58,10 @@ decoderFFmpeg::decoderFFmpeg(FFmpeg::AVCodecIDWrapper codecID, // loading the libraries which is slow and uses a lot of memory. this->ff.loadFFmpegLibraries(); if (!this->ff.loadingSuccessfull()) + { + this->setError("Error loading FFmpeg libraries."); return; + } // Create the cofiguration parameters auto codecpar = this->ff.allocCodecParameters();