summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2023-07-25 14:34:22 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2023-07-25 14:34:22 +0200
commita5539b941812b7f16e54e588eff7dfb7d4305063 (patch)
tree3b01c77c0941ac964c60a027b072509119a06046 /media-video/subtitlecomposer/files
parentkde-frameworks/bluez-qt: Add back VIRTUALX_REQUIRED, otherwise hangs (diff)
downloadgentoo-a5539b941812b7f16e54e588eff7dfb7d4305063.tar.gz
gentoo-a5539b941812b7f16e54e588eff7dfb7d4305063.tar.bz2
gentoo-a5539b941812b7f16e54e588eff7dfb7d4305063.zip
media-video/subtitlecomposer: Fix build and runtime with >=ffmpeg-6
Upstream commits: 12f4d7f49d0b1a7fc02b0836521a285e7b6bac9d 0bb0e6ed99d5a4200cc89fc6e8b3013c70465402 Closes: https://bugs.gentoo.org/910048 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-video/subtitlecomposer/files')
-rw-r--r--media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-1.patch25
-rw-r--r--media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-2.patch42
2 files changed, 67 insertions, 0 deletions
diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-1.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-1.patch
new file mode 100644
index 000000000000..7e0d873992a5
--- /dev/null
+++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-1.patch
@@ -0,0 +1,25 @@
+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
+
diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-2.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-2.patch
new file mode 100644
index 000000000000..58c3e9d9dfd3
--- /dev/null
+++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-2.patch
@@ -0,0 +1,42 @@
+From 0bb0e6ed99d5a4200cc89fc6e8b3013c70465402 Mon Sep 17 00:00:00 2001
+From: Mladen Milinkovic <maxrd2@smoothware.net>
+Date: Mon, 5 Jun 2023 10:13:15 +0200
+Subject: [PATCH] StreamProcessor: fixed embedded ASS decoding
+
+Seems embeded ASS subtitle format got changed in FFmpeg 6. Haven't found
+any references to it tho, so this might still be borked in some cases.
+---
+ src/streamprocessor/streamprocessor.cpp | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/src/streamprocessor/streamprocessor.cpp b/src/streamprocessor/streamprocessor.cpp
+index b759b0d3..1e883780 100644
+--- a/src/streamprocessor/streamprocessor.cpp
++++ b/src/streamprocessor/streamprocessor.cpp
+@@ -537,11 +537,10 @@ StreamProcessor::processText()
+ case SUBTITLE_ASS: {
+ #if 1
+ const char *assText = sub->ass;
+- if(strncmp("Dialogue", assText, 8) != 0)
+- break;
+-
++ // FIXME: did ass format change with ffmpeg6? can't find any references
++ const int textLocation = strncmp("Dialogue", assText, 8) ? 8 : 9;
+ // Dialogue: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
+- for(int c = 9; c && *assText; assText++) {
++ for(int c = textLocation; c && *assText; assText++) {
+ if(*assText == ',')
+ c--;
+ }
+@@ -550,7 +549,7 @@ StreamProcessor::processText()
+ "{\\c&H0000ff&}red {\\c&H00ff00&}green {\\c&Hff0000&}blue{\\r}\\n"
+ "Another {\\b100}bold\\h{\\i1}bolditalic{\\b0\\i0} some{\\anidfsd} unsupported tag";
+ #endif
+- QString assChunk(assText);
++ QString assChunk = QString::fromUtf8(assText);
+
+ assChunk
+ .replace(QStringLiteral("\\N"), QStringLiteral("\n"))
+--
+GitLab
+