Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/subtitlecomposer/, media-video/subtitlecomposer/files/
Date: Wed, 18 May 2022 12:51:01
Message-Id: 1652878195.46b5fab594719d2d438256d257cae5fddd07f538.asturm@gentoo
1 commit: 46b5fab594719d2d438256d257cae5fddd07f538
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 18 12:49:55 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Wed May 18 12:49:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46b5fab5
7
8 media-video/subtitlecomposer: Fix build with >=ffmpeg-5
9
10 Upstream commit 4f4f560e40ba0b760cf688eb024be3cc734ca347
11
12 Closes: https://bugs.gentoo.org/834416
13 Package-Manager: Portage-3.0.30, Repoman-3.0.3
14 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
15
16 .../files/subtitlecomposer-0.7.1-ffmpeg-5.patch | 65 ++++++++++++++++++++++
17 .../subtitlecomposer/subtitlecomposer-0.7.1.ebuild | 1 +
18 2 files changed, 66 insertions(+)
19
20 diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg-5.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg-5.patch
21 new file mode 100644
22 index 000000000000..a0314fb06820
23 --- /dev/null
24 +++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg-5.patch
25 @@ -0,0 +1,65 @@
26 +From 4f4f560e40ba0b760cf688eb024be3cc734ca347 Mon Sep 17 00:00:00 2001
27 +From: Mladen Milinkovic <maxrd2@××××××××××.net>
28 +Date: Tue, 25 Jan 2022 14:01:56 +0100
29 +Subject: [PATCH] Fix compilation with ffmpeg5 #63
30 +
31 +---
32 + src/streamprocessor/streamprocessor.cpp | 2 +-
33 + src/videoplayer/backend/decoder.h | 1 +
34 + src/videoplayer/backend/framequeue.h | 1 +
35 + src/videoplayer/backend/streamdemuxer.cpp | 2 +-
36 + 4 files changed, 4 insertions(+), 2 deletions(-)
37 +
38 +diff --git a/src/streamprocessor/streamprocessor.cpp b/src/streamprocessor/streamprocessor.cpp
39 +index b86795e..8faf8a2 100644
40 +--- a/src/streamprocessor/streamprocessor.cpp
41 ++++ b/src/streamprocessor/streamprocessor.cpp
42 +@@ -195,7 +195,7 @@ StreamProcessor::findStream(int streamType, int streamIndex, bool imageSub)
43 + int ret;
44 + char errorText[1024];
45 +
46 +- AVCodec *dec = avcodec_find_decoder(m_avStream->codecpar->codec_id);
47 ++ const AVCodec *dec = avcodec_find_decoder(m_avStream->codecpar->codec_id);
48 + if(!dec) {
49 + qWarning() << "Failed to find decoder for stream" << i;
50 + return false;
51 +diff --git a/src/videoplayer/backend/decoder.h b/src/videoplayer/backend/decoder.h
52 +index 4ab95b2..fb6840d 100644
53 +--- a/src/videoplayer/backend/decoder.h
54 ++++ b/src/videoplayer/backend/decoder.h
55 +@@ -11,6 +11,7 @@
56 + #include <QThread>
57 +
58 + extern "C" {
59 ++#include "libavcodec/avcodec.h"
60 + #include "libavformat/avformat.h"
61 + }
62 +
63 +diff --git a/src/videoplayer/backend/framequeue.h b/src/videoplayer/backend/framequeue.h
64 +index dc9b2fa..ece1166 100644
65 +--- a/src/videoplayer/backend/framequeue.h
66 ++++ b/src/videoplayer/backend/framequeue.h
67 +@@ -9,6 +9,7 @@
68 + #define FRAMEQUEUE_H
69 +
70 + extern "C" {
71 ++#include "libavcodec/avcodec.h"
72 + #include "libavformat/avformat.h"
73 + }
74 +
75 +diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp
76 +index 1e339b3..e8320ea 100644
77 +--- a/src/videoplayer/backend/streamdemuxer.cpp
78 ++++ b/src/videoplayer/backend/streamdemuxer.cpp
79 +@@ -230,7 +230,7 @@ StreamDemuxer::componentOpen(int streamIndex)
80 + {
81 + AVFormatContext *ic = m_vs->fmtContext;
82 + AVCodecContext *avCtx;
83 +- AVCodec *codec;
84 ++ const AVCodec *codec;
85 + AVDictionary *opts = nullptr;
86 + AVDictionaryEntry *t = nullptr;
87 + int sampleRate, nbChannels;
88 +--
89 +GitLab
90 +
91
92 diff --git a/media-video/subtitlecomposer/subtitlecomposer-0.7.1.ebuild b/media-video/subtitlecomposer/subtitlecomposer-0.7.1.ebuild
93 index 3ff7e5e962a5..54143eba37a9 100644
94 --- a/media-video/subtitlecomposer/subtitlecomposer-0.7.1.ebuild
95 +++ b/media-video/subtitlecomposer/subtitlecomposer-0.7.1.ebuild
96 @@ -46,6 +46,7 @@ BDEPEND="
97 PATCHES=(
98 "${FILESDIR}/${P}-tests-optional.patch"
99 "${FILESDIR}/${P}-gles-support.patch" # bug 820035
100 + "${FILESDIR}/${P}-ffmpeg-5.patch" # bug 834416
101 )
102
103 src_configure() {