File Restore-the-compatibility-with-ffmpeg-3.patch of Package ffmpegthumbs4

From 26c1d3b790d621f89cf1cbf56bdc0b8c97a95151 Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com>
Date: Sun, 25 Apr 2021 13:55:09 -0700
Subject: [PATCH] Restore the compatiblity with ffmpeg 3.

BUG: 430266
---
 ffmpegthumbnailer/moviedecoder.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ffmpegthumbnailer/moviedecoder.cpp b/ffmpegthumbnailer/moviedecoder.cpp
index 3369409..95c4ad6 100644
--- a/ffmpegthumbnailer/moviedecoder.cpp
+++ b/ffmpegthumbnailer/moviedecoder.cpp
@@ -60,6 +60,10 @@ void MovieDecoder::initialize(const QString& filename)
     m_lastHeight = -1;
     m_lastPixfmt = AV_PIX_FMT_NONE;
 
+#if (LIBAVFORMAT_VERSION_MAJOR < 58)
+    av_register_all();
+#endif
+
     QFileInfo fileInfo(filename);
 
     if ((!m_FormatContextWasGiven) && avformat_open_input(&m_pFormatContext, fileInfo.absoluteFilePath().toLocal8Bit().data(), NULL, NULL) != 0) {
-- 
GitLab

openSUSE Build Service is sponsored by