Update subtitlecomposer to 0.8.0
This commit is contained in:
parent
fe8de3cef3
commit
07e83f590a
|
@ -1,25 +0,0 @@
|
||||||
From 12f4d7f49d0b1a7fc02b0836521a285e7b6bac9d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Albert Astals Cid <aacid@kde.org>
|
|
||||||
Date: Sat, 4 Mar 2023 10:58:04 +0100
|
|
||||||
Subject: [PATCH] Use non deprecated ffmpeg api
|
|
||||||
|
|
||||||
---
|
|
||||||
src/videoplayer/backend/streamdemuxer.cpp | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/videoplayer/backend/streamdemuxer.cpp b/src/videoplayer/backend/streamdemuxer.cpp
|
|
||||||
index e3bd808a..39222d8c 100644
|
|
||||||
--- a/src/videoplayer/backend/streamdemuxer.cpp
|
|
||||||
+++ b/src/videoplayer/backend/streamdemuxer.cpp
|
|
||||||
@@ -504,7 +504,7 @@ StreamDemuxer::run()
|
|
||||||
|
|
||||||
{ // find_stream_info
|
|
||||||
const int origNbStreams = ic->nb_streams;
|
|
||||||
- AVDictionary **opts = (AVDictionary **)av_mallocz_array(origNbStreams, sizeof(*opts));
|
|
||||||
+ AVDictionary **opts = (AVDictionary **)av_calloc(origNbStreams, sizeof(*opts));
|
|
||||||
if(!opts) {
|
|
||||||
av_log(nullptr, AV_LOG_ERROR, "Could not alloc memory for stream options.\n");
|
|
||||||
goto cleanup;
|
|
||||||
--
|
|
||||||
GitLab
|
|
||||||
|
|
|
@ -1,65 +0,0 @@
|
||||||
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
|
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
# Official arch linux binaries: https://subtitlecomposer.kde.org/download.html
|
# Official arch linux binaries: https://subtitlecomposer.kde.org/download.html
|
||||||
|
|
||||||
pkgname=subtitlecomposer
|
pkgname=subtitlecomposer
|
||||||
pkgver=0.7.1
|
pkgver=0.8.0
|
||||||
pkgrel=8
|
pkgrel=1
|
||||||
pkgdesc='Video subtitle editor'
|
pkgdesc='Video subtitle editor'
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="https://invent.kde.org/multimedia/${_name}"
|
url="https://invent.kde.org/multimedia/${_name}"
|
||||||
|
@ -34,22 +34,13 @@ optdepends=(
|
||||||
|
|
||||||
_tar=${pkgname}-${pkgver}
|
_tar=${pkgname}-${pkgver}
|
||||||
source=("https://download.kde.org/stable/${pkgname}/${_tar}.tar.xz"
|
source=("https://download.kde.org/stable/${pkgname}/${_tar}.tar.xz"
|
||||||
"https://download.kde.org/stable/${pkgname}/${_tar}.tar.xz.sig"
|
"https://download.kde.org/stable/${pkgname}/${_tar}.tar.xz.sig")
|
||||||
"4f4f560e40ba0b760cf688eb024be3cc734ca347.patch"
|
sha256sums=('b1416bdf7223b1979a36620b913c117c1b6c933bf165e28491af476310d7c9f8'
|
||||||
"d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch"
|
'SKIP')
|
||||||
"12f4d7f49d0b1a7fc02b0836521a285e7b6bac9d.patch")
|
|
||||||
sha256sums=('ef9cb3c0c1fe1f40cf9d8e795859b9b28adf2da3be77a076d46bc28df4cd0255'
|
|
||||||
'SKIP'
|
|
||||||
'26197260a6e4419c7178c65a5ac9e8811418e40c97454b2aa8a62b149305dcd5'
|
|
||||||
'9df3e453d04e74a49c11ff67dbd8d9460d92744636769bf04e898f16b73124d5'
|
|
||||||
'c570f7164d9b93c1a437d71f948f3c26a20725c78a32548e00013d9f1528e7c6')
|
|
||||||
validpgpkeys=('76F79007A54A4B68F1547928E2418746EF9D9B26')
|
validpgpkeys=('76F79007A54A4B68F1547928E2418746EF9D9B26')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${srcdir}/${_tar}"
|
cd "${srcdir}/${_tar}"
|
||||||
patch -p1 -i "$srcdir/4f4f560e40ba0b760cf688eb024be3cc734ca347.patch"
|
|
||||||
patch -p1 -i "$srcdir/d8f9797d9c0d45fa9f4402f79c539544b74d2cc7.patch"
|
|
||||||
patch -p1 -i "$srcdir/12f4d7f49d0b1a7fc02b0836521a285e7b6bac9d.patch"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
From d8f9797d9c0d45fa9f4402f79c539544b74d2cc7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Mladen Milinkovic <maxrd2@smoothware.net>
|
|
||||||
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 e8320ea..7173306 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
|
|
||||||
|
|
Loading…
Reference in New Issue