]> git.pld-linux.org Git - packages/tvheadend.git/commitdiff
- fix building with ffmpeg 4.0 auto/th/tvheadend-4.0.8-2
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 29 Apr 2018 17:36:27 +0000 (19:36 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 29 Apr 2018 17:36:27 +0000 (19:36 +0200)
- don't use -Werror, breaks on harmless warnings
- rel 2

ffmpeg4.patch [new file with mode: 0644]
no-Werror.patch [new file with mode: 0644]
tvheadend.spec

diff --git a/ffmpeg4.patch b/ffmpeg4.patch
new file mode 100644 (file)
index 0000000..0ac652e
--- /dev/null
@@ -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 (file)
index 0000000..f43582f
--- /dev/null
@@ -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
index d598753b16dc0f58a71539a510702770f8f617cc..a9af5154f7987f211eb13a157f423b96fefac14c 100644 (file)
@@ -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}"
This page took 0.138547 seconds and 4 git commands to generate.