commit c9dc8559ddb1f62ce61811a2aa48be93dab50000
Author: Dominik 'Rathann' Mierzejewski <dominik(a)greysector.net>
Date: Fri Dec 29 12:30:46 2017 +0100
Fix SubRip subtitle issue when built with FFmpeg
HandBrake.spec | 8 +++++++-
handbrake_subrip.patch | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 1 deletion(-)
---
diff --git a/HandBrake.spec b/HandBrake.spec
index 0de6337..136d737 100644
--- a/HandBrake.spec
+++ b/HandBrake.spec
@@ -17,7 +17,7 @@
Name: HandBrake
Version: 1.0.7
-Release: 4%{!?tag:.%{date}git%{shortcommit0}}%{?dist}
+Release: 5%{!?tag:.%{date}git%{shortcommit0}}%{?dist}
Summary: An open-source multiplatform video transcoder
License: GPLv2+
URL:
http://handbrake.fr/
@@ -46,6 +46,8 @@ Patch2: %{name}-system-OpenCL.patch
Patch3: %{name}-nostrip.patch
# Don't link with libva unnecessarily
Patch4: %{name}-no-libva.patch
+# Fix SubRip subtitle issue when built with FFmpeg
+Patch5:
https://trac.ffmpeg.org/raw-attachment/ticket/6304/handbrake_subrip.patch
BuildRequires: a52dec-devel >= 0.7.4
BuildRequires: cmake
@@ -135,6 +137,7 @@ gpgv2 --keyring %{S:2} %{S:1} %{S:0}
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%{!?_without_ffmpeg:%patch5 -p1}
mkdir -p download
%{?_without_ffmpeg:cp -p %{SOURCE10} download}
@@ -234,6 +237,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null ||
:
%{_bindir}/HandBrakeCLI
%changelog
+* Fri Dec 29 2017 Dominik Mierzejewski <rpm(a)greysector.net> - 1.0.7-5
+- Fix SubRip subtitle issue when built with FFmpeg
+
* Thu Jul 20 2017 Dominik Mierzejewski <rpm(a)greysector.net> - 1.0.7-4
- update commit id to match 1.0.7 release
- drop redundant Provides/Obsoletes
diff --git a/handbrake_subrip.patch b/handbrake_subrip.patch
new file mode 100644
index 0000000..ba4d4db
--- /dev/null
+++ b/handbrake_subrip.patch
@@ -0,0 +1,36 @@
+From 8066b69b14735e94432316055d8546572ae65c9e Mon Sep 17 00:00:00 2001
+From: Sven Gothel <sgothel(a)jausoft.com>
+Date: Thu, 28 Dec 2017 04:28:26 +0100
+Subject: [PATCH] Using AV_CODEC_ID_SUBRIP instead of AV_CODEC_ID_SRT
+ (libav->ffmpeg)
+
+This fixes issue
https://trac.ffmpeg.org/ticket/6304
+See
https://github.com/HandBrake/HandBrake/pull/981#issuecomment-347364763
+See
https://github.com/HandBrake/HandBrake/issues/974#issuecomment-353986772
+---
+ libhb/stream.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libhb/stream.c b/libhb/stream.c
+index e223482cd..34670160b 100644
+--- a/libhb/stream.c
++++ b/libhb/stream.c
+@@ -5309,7 +5309,7 @@ static void add_ffmpeg_subtitle( hb_title_t *title, hb_stream_t
*stream, int id
+ "subtitle colors likely to be wrong" );
+ break;
+ case AV_CODEC_ID_TEXT:
+- case AV_CODEC_ID_SRT:
++ case AV_CODEC_ID_SUBRIP:
+ subtitle->format = TEXTSUB;
+ subtitle->source = UTF8SUB;
+ subtitle->config.dest = PASSTHRUSUB;
+@@ -5882,7 +5882,7 @@ hb_buffer_t * hb_ffmpeg_read( hb_stream_t *stream )
+ break;
+ }
+ if ( ffmpeg_pkt_codec == AV_CODEC_ID_TEXT ||
+- ffmpeg_pkt_codec == AV_CODEC_ID_SRT ||
++ ffmpeg_pkt_codec == AV_CODEC_ID_SUBRIP ||
+ ffmpeg_pkt_codec == AV_CODEC_ID_MOV_TEXT ) {
+ int64_t ffmpeg_pkt_duration = stream->ffmpeg_pkt.duration;
+ int64_t buf_duration = av_to_hb_pts( ffmpeg_pkt_duration, tsconv, 0 );
+