[packages/tvheadend] - fix building with ffmpeg 4.0 - don't use -Werror, breaks on harmless warnings - rel 2
baggins
baggins at pld-linux.org
Sun Apr 29 19:37:00 CEST 2018
commit 8dc1827208c0d8b26f635cbeccff41bbd6e05f42
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Apr 29 19:36:27 2018 +0200
- fix building with ffmpeg 4.0
- don't use -Werror, breaks on harmless warnings
- rel 2
ffmpeg4.patch | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
no-Werror.patch | 11 +++++++++
tvheadend.spec | 6 ++++-
3 files changed, 90 insertions(+), 1 deletion(-)
---
diff --git a/tvheadend.spec b/tvheadend.spec
index d598753..a9af515 100644
--- a/tvheadend.spec
+++ b/tvheadend.spec
@@ -2,7 +2,7 @@ Summary: TV streaming server
Name: tvheadend
# https://tvheadend.org/projects/tvheadend/wiki/Releases
Version: 4.0.8
-Release: 1
+Release: 2
License: GPL v3
Group: Applications/Multimedia
Source0: https://github.com/tvheadend/tvheadend/archive/v%{version}/%{name}-%{version}.tar.gz
@@ -15,6 +15,8 @@ Patch0: x32.patch
Patch1: ffmpeg3.patch
Patch2: 64bit.patch
Patch3: 32bit.patch
+Patch4: ffmpeg4.patch
+Patch5: no-Werror.patch
URL: https://tvheadend.org/projects/tvheadend
BuildRequires: avahi-devel
BuildRequires: curl-devel
@@ -49,6 +51,8 @@ DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources.
%ifarch %{ix86} x32
%patch3 -p1
%endif
+%patch4 -p1
+%patch5 -p1
%build
export CFLAGS="%{rpmcflags}"
diff --git a/ffmpeg4.patch b/ffmpeg4.patch
new file mode 100644
index 0000000..0ac652e
--- /dev/null
+++ b/ffmpeg4.patch
@@ -0,0 +1,74 @@
+--- tvheadend-4.0.8/src/muxer/muxer_libav.c~ 2015-12-16 18:33:33.000000000 +0100
++++ tvheadend-4.0.8/src/muxer/muxer_libav.c 2018-04-29 19:32:22.156055706 +0200
+@@ -160,7 +160,7 @@
+ }
+
+ if(lm->lm_oc->oformat->flags & AVFMT_GLOBALHEADER)
+- c->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ c->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+
+ return 0;
+ }
+--- tvheadend-4.0.8/src/plumbing/transcoding.c~ 2018-04-29 19:28:53.000000000 +0200
++++ tvheadend-4.0.8/src/plumbing/transcoding.c 2018-04-29 19:33:35.763344908 +0200
+@@ -19,7 +19,7 @@
+ #include <unistd.h>
+ #include <libavformat/avformat.h>
+ #include <libavcodec/avcodec.h>
+-#include <libavfilter/avfiltergraph.h>
++#include <libavfilter/avfilter.h>
+ #include <libavfilter/buffersink.h>
+ #include <libavfilter/buffersrc.h>
+ #include <libavutil/opt.h>
+@@ -559,12 +559,12 @@
+ break;
+
+ case SCT_AAC:
+- octx->flags |= CODEC_FLAG_BITEXACT;
++ octx->flags |= AV_CODEC_FLAG_BITEXACT;
+ break;
+
+ case SCT_VORBIS:
+- octx->flags |= CODEC_FLAG_QSCALE;
+- octx->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ octx->flags |= AV_CODEC_FLAG_QSCALE;
++ octx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+ octx->global_quality = 4*FF_QP2LAMBDA;
+ break;
+
+@@ -1172,7 +1172,7 @@
+ case SCT_MPEG2VIDEO:
+ octx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
+ octx->pix_fmt = AV_PIX_FMT_YUV420P;
+- octx->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ octx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+
+ // Default settings for quantizer. Best quality unless changed by the streaming profile.
+ octx->qmin = 1;
+@@ -1231,7 +1231,7 @@
+ case SCT_H264:
+ octx->codec_id = AV_CODEC_ID_H264;
+ octx->pix_fmt = AV_PIX_FMT_YUV420P;
+- octx->flags |= CODEC_FLAG_GLOBAL_HEADER;
++ octx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+
+ // Qscale difference between I-frames and P-frames.
+ // Note: -i_qfactor is handled a little differently than --ipratio.
+@@ -1965,7 +1965,7 @@
+ if (!WORKING_ENCODER(p->id))
+ continue;
+
+- if ((p->capabilities & CODEC_CAP_EXPERIMENTAL) && !experimental)
++ if ((p->capabilities & AV_CODEC_CAP_EXPERIMENTAL) && !experimental)
+ continue;
+
+ sct = codec_id2streaming_component_type(p->id);
+@@ -1978,7 +1978,7 @@
+ htsmsg_add_str(m, "name", p->name);
+ snprintf(buf, sizeof(buf), "%s%s",
+ p->long_name ?: "",
+- (p->capabilities & CODEC_CAP_EXPERIMENTAL) ?
++ (p->capabilities & AV_CODEC_CAP_EXPERIMENTAL) ?
+ " (Experimental)" : "");
+ if (buf[0] != '\0')
+ htsmsg_add_str(m, "long_name", buf);
diff --git a/no-Werror.patch b/no-Werror.patch
new file mode 100644
index 0000000..f43582f
--- /dev/null
+++ b/no-Werror.patch
@@ -0,0 +1,11 @@
+--- tvheadend-4.0.8/Makefile~ 2018-04-29 19:28:53.000000000 +0200
++++ tvheadend-4.0.8/Makefile 2018-04-29 19:31:17.392096527 +0200
+@@ -28,7 +28,7 @@
+ #
+
+ CFLAGS += -g -O2 -Wunused-result
+-CFLAGS += -Wall -Werror -Wwrite-strings -Wno-deprecated-declarations
++CFLAGS += -Wall -Wwrite-strings -Wno-deprecated-declarations
+ CFLAGS += -Wmissing-prototypes
+ CFLAGS += -fms-extensions -funsigned-char -fno-strict-aliasing
+ CFLAGS += -D_FILE_OFFSET_BITS=64
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/tvheadend.git/commitdiff/8dc1827208c0d8b26f635cbeccff41bbd6e05f42
More information about the pld-cvs-commit
mailing list