From d433eaff4a109469354435a53a50cd22319e3d477c9edf2705f8f55150fc5593 Mon Sep 17 00:00:00 2001 From: Christophe Marin Date: Mon, 17 Apr 2023 17:00:25 +0000 Subject: [PATCH] Accepting request 1079742 from home:benoit_monin:branches:KDE:Extra Add d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch: Fix video player with newer version of ffmpeg OBS-URL: https://build.opensuse.org/request/show/1079742 OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/subtitlecomposer?expand=0&rev=34 --- ...797d9c0d45fa9f4402f79c539544b74d2cc7.patch | 32 +++++++++++++++++++ subtitlecomposer.changes | 6 ++++ subtitlecomposer.spec | 4 ++- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch diff --git a/d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch b/d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch new file mode 100644 index 0000000..e3546c4 --- /dev/null +++ b/d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch @@ -0,0 +1,32 @@ +From d8f9797d9c0d45fa9f4402f79c539544b74d2cc7 Mon Sep 17 00:00:00 2001 +From: Mladen Milinkovic +Date: Fri, 1 Apr 2022 08:35:17 +0200 +Subject: [PATCH] VideoPlayer: Fix usage of deprecated/removed AVCodec option + #68 + +AVCodecContext.refcounted_frames was useful for deprecated API only +(avcodec_decode_video2/avcodec_decode_audio4). The new decode APIs +(avcodec_send_packet/avcodec_receive_frame) always work with reference +counted frames + +https://github.com/FFmpeg/FFmpeg/commit/b1cf151c4dfdbd049cd41863b4e0cde927585e17 +--- + src/videoplayer/backend/streamdemuxer.cpp | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp +index e8320ea0..7173306f 100644 +--- a/src/videoplayer/backend/streamdemuxer.cpp ++++ b/src/videoplayer/backend/streamdemuxer.cpp +@@ -286,8 +286,6 @@ StreamDemuxer::componentOpen(int streamIndex) + av_dict_set(&opts, "threads", "auto", 0); + if(stream_lowres) + av_dict_set_int(&opts, "lowres", stream_lowres, 0); +- if(avCtx->codec_type == AVMEDIA_TYPE_VIDEO || avCtx->codec_type == AVMEDIA_TYPE_AUDIO) +- av_dict_set(&opts, "refcounted_frames", "1", 0); + if((ret = avcodec_open2(avCtx, codec, &opts)) < 0) { + goto fail; + } +-- +GitLab + diff --git a/subtitlecomposer.changes b/subtitlecomposer.changes index 0306435..4f8ffbb 100644 --- a/subtitlecomposer.changes +++ b/subtitlecomposer.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Apr 16 09:14:38 UTC 2023 - Benoît Monin + +- Add d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch: Fix video + player with newer version of ffmpeg + ------------------------------------------------------------------- Tue Jul 12 20:38:48 UTC 2022 - Bjørn Lie diff --git a/subtitlecomposer.spec b/subtitlecomposer.spec index 7704740..490e98d 100644 --- a/subtitlecomposer.spec +++ b/subtitlecomposer.spec @@ -1,7 +1,7 @@ # # spec file for package subtitlecomposer # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,8 @@ Patch0: subtitlecomposer-ARM_GLES.patch Patch1: subtitlecomposer-fix_empty_lines_crash.patch # PATCH-FIX-UPSTREAM 4f4f560e40ba0b760cf688eb024be3cc734ca347.patch - Fix build with ffmpeg 5 Patch2: https://invent.kde.org/multimedia/subtitlecomposer/-/commit/4f4f560e40ba0b760cf688eb024be3cc734ca347.patch +# PATCH-FIX-UPSTREAM d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch - Fix video player +Patch3: https://invent.kde.org/multimedia/subtitlecomposer/-/commit/d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch BuildRequires: cmake >= 3.10 BuildRequires: extra-cmake-modules BuildRequires: libQt5Widgets-private-headers-devel