From 343585b79a097b666ebf4d1a95320aeaceff41c0 Mon Sep 17 00:00:00 2001 From: nucleo Date: Apr 15 2023 17:35:15 +0000 Subject: fixed crash in MediaPlayer --- diff --git a/digikam-8.0.0-ffmpeg5.patch b/digikam-8.0.0-ffmpeg5.patch new file mode 100644 index 0000000..d2659d0 --- /dev/null +++ b/digikam-8.0.0-ffmpeg5.patch @@ -0,0 +1,28 @@ +--- digikam-8.0.0/core/libs/video/qtav/codec/AVDecoder.cpp 2023-04-12 19:24:31.000000000 +0300 ++++ digikam-8.0.0/core/libs/video/qtav/codec/AVDecoder.cpp 2023-04-15 19:43:54.000000000 +0300 +@@ -255,7 +255,7 @@ void AVDecoder::flush() + avcodec_flush_buffers(d_func().codec_ctx); + } + +-#if LIBAVCODEC_VERSION_MAJOR >= 59 // ffmpeg >= 5 ++#ifdef HAVE_FFMPEG_VERSION5 // ffmpeg >= 5 + + static QHash ccs; + +@@ -302,9 +302,15 @@ void AVDecoder::setCodecContext(void* co + + if (!ctx) + { ++ ++#ifdef HAVE_FFMPEG_VERSION5 ++ ++ ccs.remove(ccs.key(d.codec_ctx)); ++ ++#endif ++ + avcodec_free_context(&d.codec_ctx); + d.codec_ctx = nullptr; +- + return; + } + diff --git a/digikam.spec b/digikam.spec index ceca95a..5b311e8 100644 --- a/digikam.spec +++ b/digikam.spec @@ -24,6 +24,8 @@ Source0: http://download.kde.org/stable/digikam/%{version}/digiKam-%{version}.ta Source10: digikam-import.desktop ## upstream patches +# fix ffmpeg5-related mediaplayer crash https://bugs.kde.org/show_bug.cgi?id=468480 +Patch0: digikam-8.0.0-ffmpeg5.patch ## upstreamable patches @@ -268,6 +270,9 @@ update-desktop-database -q &> /dev/null %changelog +* Sat Apr 15 2023 Alexey Kurov - 8.0.0-2 +- fixed crash in MediaPlayer + * Thu Apr 13 2023 Alexey Kurov - 8.0.0-1 - digiKam-8.0.0 - enabled MediaPlayer