[tvheadend] Fix build with FFmpeg >= 3.1

Mohamed ElMorabity melmorabity at rpmfusion.org
Tue Aug 9 12:17:56 CEST 2016


commit f42772973550e05d309b5a75ddc4b5ca136f3ca8
Author: Mohamed El Morabity <melmorabity at fedoraproject.org>
Date:   Tue Aug 9 12:17:54 2016 +0200

    Fix build with FFmpeg >= 3.1

 tvheadend-4.0.9-ffmpeg_3.1.patch | 20 ++++++++++++++++++++
 tvheadend.spec                   | 12 +++++++++++-
 2 files changed, 31 insertions(+), 1 deletion(-)
---
diff --git a/tvheadend-4.0.9-ffmpeg_3.1.patch b/tvheadend-4.0.9-ffmpeg_3.1.patch
new file mode 100644
index 0000000..a5dae10
--- /dev/null
+++ b/tvheadend-4.0.9-ffmpeg_3.1.patch
@@ -0,0 +1,20 @@
+diff -up ./src/plumbing/transcoding.c.orig ./src/plumbing/transcoding.c
+--- ./src/plumbing/transcoding.c.orig	2016-08-09 12:03:40.771743804 +0200
++++ ./src/plumbing/transcoding.c	2016-08-09 12:06:47.919483730 +0200
+@@ -716,12 +716,12 @@ transcoder_stream_audio(transcoder_t *t,
+       // Convert audio
+       tvhtrace("transcode", "%04X: converting audio", shortid(t));
+ 
+-      tvhtrace("transcode", "%04X: IN : channels=%d, layout=%" PRIi64 ", rate=%d, fmt=%d, bitrate=%ld",
++      tvhtrace("transcode", "%04X: IN : channels=%d, layout=%" PRIi64 ", rate=%d, fmt=%d, bitrate=%"PRId64,
+                shortid(t), ictx->channels, ictx->channel_layout, ictx->sample_rate,
+-               ictx->sample_fmt, ictx->bit_rate);
+-      tvhtrace("transcode", "%04X: OUT: channels=%d, layout=%" PRIi64 ", rate=%d, fmt=%d, bitrate=%ld",
++               ictx->sample_fmt, (int64_t)ictx->bit_rate);
++      tvhtrace("transcode", "%04X: OUT: channels=%d, layout=%" PRIi64 ", rate=%d, fmt=%d, bitrate=%"PRId64,
+                shortid(t), octx->channels, octx->channel_layout, octx->sample_rate,
+-               octx->sample_fmt, octx->bit_rate);
++               octx->sample_fmt, (int64_t)octx->bit_rate);
+ 
+       if (transcode_opt_set_int(t, ts, as->resample_context,
+                                 "in_channel_layout", ictx->channel_layout, 1))
diff --git a/tvheadend.spec b/tvheadend.spec
index 3080dbe..e3fec82 100644
--- a/tvheadend.spec
+++ b/tvheadend.spec
@@ -3,7 +3,7 @@
 
 Name:           tvheadend
 Version:        4.0.9
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        TV streaming server and digital video recorder
 
 Group:          Applications/Multimedia
@@ -31,6 +31,9 @@ Patch5:         %{name}-4.0.9-service.patch
 # Enforcing system crypto policies, see
 # https://fedoraproject.org/wiki/Packaging:CryptoPolicies
 Patch6:         %{name}-4.0.9-crypto_policies.patch
+# Fix build with FFmpeg >= 3.1, based on
+# https://github.com/tvheadend/tvheadend/commit/374ab83
+Patch7:         %{name}-4.0.9-ffmpeg_3.1.patch
 
 BuildRequires:  bzip2
 BuildRequires:  gcc
@@ -79,6 +82,10 @@ MPEG-TS stream generated by ffmpeg/libav from a V4L device.
 %patch4 -p0 -b .dtv_scan_tables
 %patch5 -p0 -b .service
 %patch6 -p0 -b .crypto_policies
+# RPM Fusion provides FFMpeg 3.1 for Fedora >= 25
+%if 0%{?fedora} >= 25
+%patch7 -p0 -b .ffmpeg_3.1
+%endif
 
 # Delete bundled system headers
 rm -r vendor/{dvb-api,include}/
@@ -142,5 +149,8 @@ exit 0
 
 
 %changelog
+* Tue Aug 09 2016 Mohamed El Morabity <melmorabity at fedoraproject.org> - 4.0.9-2
+- Fix build with FFmpeg 3.1
+
 * Thu Jul 28 2016 Mohamed El Morabity <melmorabity at fedoraproject.org> - 4.0.9-1
 - Initial RPM release


More information about the rpmfusion-commits mailing list