mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
media-video/subtitlecomposer: Fix build with >=ffmpeg-5
Upstream commit 4f4f560e40ba0b760cf688eb024be3cc734ca347 Closes: https://bugs.gentoo.org/834416 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
From 4f4f560e40ba0b760cf688eb024be3cc734ca347 Mon Sep 17 00:00:00 2001
|
||||
From: Mladen Milinkovic <maxrd2@smoothware.net>
|
||||
Date: Tue, 25 Jan 2022 14:01:56 +0100
|
||||
Subject: [PATCH] Fix compilation with ffmpeg5 #63
|
||||
|
||||
---
|
||||
src/streamprocessor/streamprocessor.cpp | 2 +-
|
||||
src/videoplayer/backend/decoder.h | 1 +
|
||||
src/videoplayer/backend/framequeue.h | 1 +
|
||||
src/videoplayer/backend/streamdemuxer.cpp | 2 +-
|
||||
4 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/streamprocessor/streamprocessor.cpp b/src/streamprocessor/streamprocessor.cpp
|
||||
index b86795e..8faf8a2 100644
|
||||
--- a/src/streamprocessor/streamprocessor.cpp
|
||||
+++ b/src/streamprocessor/streamprocessor.cpp
|
||||
@@ -195,7 +195,7 @@ StreamProcessor::findStream(int streamType, int streamIndex, bool imageSub)
|
||||
int ret;
|
||||
char errorText[1024];
|
||||
|
||||
- AVCodec *dec = avcodec_find_decoder(m_avStream->codecpar->codec_id);
|
||||
+ const AVCodec *dec = avcodec_find_decoder(m_avStream->codecpar->codec_id);
|
||||
if(!dec) {
|
||||
qWarning() << "Failed to find decoder for stream" << i;
|
||||
return false;
|
||||
diff --git a/src/videoplayer/backend/decoder.h b/src/videoplayer/backend/decoder.h
|
||||
index 4ab95b2..fb6840d 100644
|
||||
--- a/src/videoplayer/backend/decoder.h
|
||||
+++ b/src/videoplayer/backend/decoder.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <QThread>
|
||||
|
||||
extern "C" {
|
||||
+#include "libavcodec/avcodec.h"
|
||||
#include "libavformat/avformat.h"
|
||||
}
|
||||
|
||||
diff --git a/src/videoplayer/backend/framequeue.h b/src/videoplayer/backend/framequeue.h
|
||||
index dc9b2fa..ece1166 100644
|
||||
--- a/src/videoplayer/backend/framequeue.h
|
||||
+++ b/src/videoplayer/backend/framequeue.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#define FRAMEQUEUE_H
|
||||
|
||||
extern "C" {
|
||||
+#include "libavcodec/avcodec.h"
|
||||
#include "libavformat/avformat.h"
|
||||
}
|
||||
|
||||
diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp
|
||||
index 1e339b3..e8320ea 100644
|
||||
--- a/src/videoplayer/backend/streamdemuxer.cpp
|
||||
+++ b/src/videoplayer/backend/streamdemuxer.cpp
|
||||
@@ -230,7 +230,7 @@ StreamDemuxer::componentOpen(int streamIndex)
|
||||
{
|
||||
AVFormatContext *ic = m_vs->fmtContext;
|
||||
AVCodecContext *avCtx;
|
||||
- AVCodec *codec;
|
||||
+ const AVCodec *codec;
|
||||
AVDictionary *opts = nullptr;
|
||||
AVDictionaryEntry *t = nullptr;
|
||||
int sampleRate, nbChannels;
|
||||
--
|
||||
GitLab
|
||||
|
||||
@@ -46,6 +46,7 @@ BDEPEND="
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-tests-optional.patch"
|
||||
"${FILESDIR}/${P}-gles-support.patch" # bug 820035
|
||||
"${FILESDIR}/${P}-ffmpeg-5.patch" # bug 834416
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
|
||||
Reference in New Issue
Block a user