summaryrefslogtreecommitdiff
path: root/media-video/subtitlecomposer/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-03 04:17:54 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-03 04:17:54 +0100
commit778487365a91290a8fd0376883de1a4e874fe27b (patch)
tree3bdbb40cf98700e611d8a85531466480059442bb /media-video/subtitlecomposer/files
parentf247b36fc6df2694a347f5305eeb7f927d7c0ffe (diff)
gentoo auto-resync : 03:09:2023 - 04:17:54
Diffstat (limited to 'media-video/subtitlecomposer/files')
-rw-r--r--media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-changingaudio-crashfix.patch67
-rw-r--r--media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-3.patch32
-rw-r--r--media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-nullptr-deref.patch25
-rw-r--r--media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-subtitle-crashfix.patch25
-rw-r--r--media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-vobsub-crashfix.patch45
5 files changed, 194 insertions, 0 deletions
diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-changingaudio-crashfix.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-changingaudio-crashfix.patch
new file mode 100644
index 000000000000..be580af101d5
--- /dev/null
+++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-changingaudio-crashfix.patch
@@ -0,0 +1,67 @@
+From 88a6cf4e4aaa58229b9b07d66c2abd264dfbc2f1 Mon Sep 17 00:00:00 2001
+From: Mladen Milinkovic <maxrd2@smoothware.net>
+Date: Fri, 17 Jun 2022 21:34:20 +0200
+Subject: [PATCH] Fix deadlock/crash while changing audio stream on
+ paused/stopped media #71
+
+---
+ src/videoplayer/backend/audiodecoder.cpp | 2 +-
+ src/videoplayer/backend/decoder.cpp | 1 +
+ src/videoplayer/backend/ffplayer.cpp | 2 ++
+ src/videoplayer/videoplayer.cpp | 2 ++
+ 4 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/videoplayer/backend/audiodecoder.cpp b/src/videoplayer/backend/audiodecoder.cpp
+index d3d13e78..9c7ee1fc 100644
+--- a/src/videoplayer/backend/audiodecoder.cpp
++++ b/src/videoplayer/backend/audiodecoder.cpp
+@@ -499,7 +499,7 @@ AudioDecoder::run()
+ // bytes needed for 100ms of audio
+ const ALint hwMinBytes = m_vs->audClk.speed() * m_fmtTgt.bytesPerSec * .100;
+
+- while(!m_vs->abortRequested) {
++ while(!m_vs->abortRequested && !isInterruptionRequested()) {
+ ALint hwBufOffset = 0;
+ alGetSourcei(m_alSrc, AL_BYTE_OFFSET, &hwBufOffset);
+ if(!std::isnan(af->pts)) {
+diff --git a/src/videoplayer/backend/decoder.cpp b/src/videoplayer/backend/decoder.cpp
+index 79b1ad7a..8a69d918 100644
+--- a/src/videoplayer/backend/decoder.cpp
++++ b/src/videoplayer/backend/decoder.cpp
+@@ -155,6 +155,7 @@ Decoder::abort()
+ m_queue->abort();
+ if(m_frameQueue)
+ m_frameQueue->signal();
++ requestInterruption();
+ wait();
+ m_queue->flush();
+ }
+diff --git a/src/videoplayer/backend/ffplayer.cpp b/src/videoplayer/backend/ffplayer.cpp
+index 88288285..7b26e4a4 100644
+--- a/src/videoplayer/backend/ffplayer.cpp
++++ b/src/videoplayer/backend/ffplayer.cpp
+@@ -288,6 +288,8 @@ FFPlayer::activeAudioStream()
+ void
+ FFPlayer::activeAudioStream(int streamIndex)
+ {
++ if(!m_vs)
++ return;
+ streamIndex = streamIndex < 0 ? -1 : m_vs->demuxer->absoluteStreamIndex(AVMEDIA_TYPE_AUDIO, streamIndex);
+ m_vs->demuxer->selectStream(AVMEDIA_TYPE_AUDIO, streamIndex);
+ }
+diff --git a/src/videoplayer/videoplayer.cpp b/src/videoplayer/videoplayer.cpp
+index 0307ce7d..a42babe5 100644
+--- a/src/videoplayer/videoplayer.cpp
++++ b/src/videoplayer/videoplayer.cpp
+@@ -301,6 +301,8 @@ VideoPlayer::setupNotifications()
+
+ //connect(m_player, &FFPlayer::videoStreamsChanged, this, [this](const QStringList &streams){});
+ connect(m_player, &FFPlayer::audioStreamsChanged, this, [this](const QStringList &streams){
++ if(m_activeAudioStream >= 0)
++ m_player->activeAudioStream(m_activeAudioStream);
+ emit audioStreamsChanged(m_audioStreams = streams);
+ emit activeAudioStreamChanged(m_activeAudioStream = m_player->activeAudioStream());
+ });
+--
+GitLab
+
diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-3.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-3.patch
new file mode 100644
index 000000000000..2887f179afd1
--- /dev/null
+++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-ffmpeg6-3.patch
@@ -0,0 +1,32 @@
+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 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/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-nullptr-deref.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-nullptr-deref.patch
new file mode 100644
index 000000000000..d6417179d436
--- /dev/null
+++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-nullptr-deref.patch
@@ -0,0 +1,25 @@
+From c94e4dc1362b9ac03cddb9def913ea6728875fe2 Mon Sep 17 00:00:00 2001
+From: Mladen Milinkovic <maxrd2@smoothware.net>
+Date: Sun, 18 Sep 2022 23:09:17 +0200
+Subject: [PATCH] Fixed possible null pointer deref
+
+---
+ 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 d15cf9f4..4ae4171d 100644
+--- a/src/videoplayer/backend/streamdemuxer.cpp
++++ b/src/videoplayer/backend/streamdemuxer.cpp
+@@ -45,7 +45,7 @@ isRealTime(AVFormatContext *s)
+ #else
+ const char *url = s->url;
+ #endif
+- if(s->pb && (!strncmp(url, "rtp:", 4) || !strncmp(url, "udp:", 4)))
++ if(s->pb && url && (!strncmp(url, "rtp:", 4) || !strncmp(url, "udp:", 4)))
+ return 1;
+ return 0;
+ }
+--
+GitLab
+
diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-subtitle-crashfix.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-subtitle-crashfix.patch
new file mode 100644
index 000000000000..4502d7254f9b
--- /dev/null
+++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-subtitle-crashfix.patch
@@ -0,0 +1,25 @@
+From 09e5d80286276d4683c944dfa0cddda3479006c0 Mon Sep 17 00:00:00 2001
+From: Mladen Milinkovic <maxrd2@smoothware.net>
+Date: Thu, 19 Jan 2023 18:39:31 +0100
+Subject: [PATCH] Subtitle: fixed crash in splitLines()
+
+---
+ src/core/subtitle.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/subtitle.cpp b/src/core/subtitle.cpp
+index d3da532d..3359062e 100644
+--- a/src/core/subtitle.cpp
++++ b/src/core/subtitle.cpp
+@@ -541,7 +541,7 @@ Subtitle::splitLines(const RangeList &ranges)
+ c->insertText(QString(QChar::LineFeed));
+ return true;
+ }
+- if(text.at(j) == QChar::Space) {
++ if(j < len && text.at(j) == QChar::Space) {
+ c->movePosition(QTextCursor::Start);
+ c->movePosition(QTextCursor::NextCharacter, QTextCursor::MoveAnchor, j);
+ c->movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor);
+--
+GitLab
+
diff --git a/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-vobsub-crashfix.patch b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-vobsub-crashfix.patch
new file mode 100644
index 000000000000..20c5835ba971
--- /dev/null
+++ b/media-video/subtitlecomposer/files/subtitlecomposer-0.7.1-vobsub-crashfix.patch
@@ -0,0 +1,45 @@
+From 78553af05ba97da0920f7cabd281503bd4ca484a Mon Sep 17 00:00:00 2001
+From: Mladen Milinkovic <maxrd2@smoothware.net>
+Date: Wed, 23 Nov 2022 15:47:56 +0100
+Subject: [PATCH] VobSub: fixed crash when moving to previous image
+
+Do not delete lines on temporary Subtitle that is shown in LinesWidget.
+SubtitleLine is deleted immediately, while LinesWidget wants to repaint
+before line reference is removed from its list model.
+
+https://bugs.kde.org/show_bug.cgi?id=462156
+---
+ src/formats/vobsub/vobsubinputprocessdialog.cpp | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/src/formats/vobsub/vobsubinputprocessdialog.cpp b/src/formats/vobsub/vobsubinputprocessdialog.cpp
+index ac54b552..2ba61550 100644
+--- a/src/formats/vobsub/vobsubinputprocessdialog.cpp
++++ b/src/formats/vobsub/vobsubinputprocessdialog.cpp
+@@ -697,9 +697,12 @@ VobSubInputProcessDialog::processNextPiece()
+ piecePrev = piece;
+ }
+
+- SubtitleLine *l = new SubtitleLine((*m_frameCurrent)->subShowTime, (*m_frameCurrent)->subHideTime);
++ SubtitleLine *l = m_subtitle->line((*m_frameCurrent)->index);
++ if(!l) {
++ l = new SubtitleLine((*m_frameCurrent)->subShowTime, (*m_frameCurrent)->subHideTime);
++ m_subtitle->insertLine(l);
++ }
+ l->primaryDoc()->setPlainText(subText);
+- m_subtitle->insertLine(l);
+
+ ui->grpText->setDisabled(true);
+ ui->grpNavButtons->setDisabled(true);
+@@ -809,8 +812,6 @@ VobSubInputProcessDialog::onPrevImageClicked()
+ return;
+
+ --m_frameCurrent;
+- if(m_subtitle->lastIndex() >= 0)
+- m_subtitle->removeLines(RangeList(Range(m_subtitle->lastIndex())), Both);
+
+ ui->progressBar->setValue((*m_frameCurrent)->index + 1);
+
+--
+GitLab
+