| 1 |
From: Arun Kumar Pariyar <[email protected]> |
| 2 |
Date: Mon, 17 Feb 2025 15:45:57 -0500 |
| 3 |
Subject: Fix ftbfs with ffmpeg 7 |
| 4 |
|
| 5 |
Bug-Debian: https://bugs.debian.org/1078276 |
| 6 |
Last-Update: 2024-09-14 |
| 7 |
|
| 8 |
Last-Update: 2024-09-14 |
| 9 |
--- |
| 10 |
src/album/imageengine/movieservice.cpp | 8 ++++++-- |
| 11 |
1 file changed, 6 insertions(+), 2 deletions(-) |
| 12 |
|
| 13 |
diff --git a/src/album/imageengine/movieservice.cpp b/src/album/imageengine/movieservice.cpp |
| 14 |
index 0c7792b..e13f30b 100644 |
| 15 |
--- a/src/album/imageengine/movieservice.cpp |
| 16 |
+++ b/src/album/imageengine/movieservice.cpp |
| 17 |
@@ -36,7 +36,7 @@ extern "C" { |
| 18 |
|
| 19 |
#define THUMBNAIL_SIZE 500 |
| 20 |
#define SEEK_TIME "00:00:01" |
| 21 |
- |
| 22 |
+#define HAVE_CH_LAYOUT (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(57, 28, 100)) |
| 23 |
MovieService *MovieService::m_movieService = nullptr; |
| 24 |
|
| 25 |
typedef int (*mvideo_avformat_open_input)(AVFormatContext **ps, const char *url, AVInputFormat *fmt, AVDictionary **options); |
| 26 |
@@ -185,7 +185,11 @@ MovieInfo MovieService::parseFromFile(const QFileInfo &fi) |
| 27 |
mi.aCodeID = audio_dec_ctx->codec_id; |
| 28 |
mi.aCodeRate = audio_dec_ctx->bit_rate; |
| 29 |
mi.aDigit = audio_dec_ctx->format; |
| 30 |
- mi.channels = audio_dec_ctx->channels; |
| 31 |
+ #if HAVE_CH_LAYOUT |
| 32 |
+ mi.channels = audio_dec_ctx->ch_layout.nb_channels; |
| 33 |
+ #else |
| 34 |
+ mi.channels = audio_dec_ctx->channels; |
| 35 |
+ #endif |
| 36 |
mi.sampling = audio_dec_ctx->sample_rate; |
| 37 |
} |
| 38 |
|