View | Details | Raw Unified | Return to bug 237320 | Differences between
and this patch

Collapse All | Expand All

(-)multimedia/lives/Makefile (-11 / +14 lines)
Lines 3-9 Link Here
3
3
4
PORTNAME=	lives
4
PORTNAME=	lives
5
PORTVERSION=	2.10.2
5
PORTVERSION=	2.10.2
6
PORTREVISION=	1
6
PORTREVISION=	2
7
CATEGORIES=	multimedia
7
CATEGORIES=	multimedia
8
MASTER_SITES=	http://lives-video.com/releases/
8
MASTER_SITES=	http://lives-video.com/releases/
9
DISTNAME=	LiVES-${PORTVERSION}
9
DISTNAME=	LiVES-${PORTVERSION}
Lines 14-23 Link Here
14
LICENSE=	GPLv3+
14
LICENSE=	GPLv3+
15
LICENSE_FILE=	${WRKSRC}/COPYING
15
LICENSE_FILE=	${WRKSRC}/COPYING
16
16
17
BROKEN=		fails to patch
17
OCV_VERSION=	3.4
18
19
BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto \
18
BUILD_DEPENDS=	${LOCALBASE}/include/linux/input.h:devel/evdev-proto \
20
		${LOCALBASE}/bin/analyseplugin:audio/ladspa
19
		${LOCALBASE}/bin/analyseplugin:audio/ladspa \
20
		${LOCALBASE}/lib/opencv${OCV_VERSION}/libopencv_calib3d.so:graphics/opencv3 \
21
		${LOCALBASE}/lib/opencv${OCV_VERSION}/libopencv_core.so:graphics/opencv3-core
21
LIB_DEPENDS=	libasound.so:audio/alsa-lib \
22
LIB_DEPENDS=	libasound.so:audio/alsa-lib \
22
		libjack.so:audio/jack \
23
		libjack.so:audio/jack \
23
		libogg.so:audio/libogg \
24
		libogg.so:audio/libogg \
Lines 25-32 Link Here
25
		liboil-0.3.so:devel/liboil \
26
		liboil-0.3.so:devel/liboil \
26
		libprojectM.so:graphics/libprojectm \
27
		libprojectM.so:graphics/libprojectm \
27
		libvisual-0.4.so:graphics/libvisual04 \
28
		libvisual-0.4.so:graphics/libvisual04 \
28
		libopencv_calib3d.so:graphics/opencv \
29
		libopencv_core.so:graphics/opencv-core \
30
		libpng.so:graphics/png \
29
		libpng.so:graphics/png \
31
		libfftw3.so:math/fftw3 \
30
		libfftw3.so:math/fftw3 \
32
		libfftw3f.so:math/fftw3-float \
31
		libfftw3f.so:math/fftw3-float \
Lines 46-57 Link Here
46
		ogmmerge:multimedia/ogmtools \
45
		ogmmerge:multimedia/ogmtools \
47
		transcode:multimedia/transcode \
46
		transcode:multimedia/transcode \
48
		x264:multimedia/x264 \
47
		x264:multimedia/x264 \
49
		cdrecord:sysutils/cdrtools
48
		cdrecord:sysutils/cdrtools \
49
		${LOCALBASE}/lib/opencv${OCV_VERSION}/libopencv_calib3d.so:graphics/opencv3 \
50
		${LOCALBASE}/lib/opencv${OCV_VERSION}/libopencv_core.so:graphics/opencv3-core
50
51
51
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
52
WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
52
53
53
USES=		compiler:c++11-lib gettext-runtime ghostscript:run libtool \
54
USES=		autoreconf compiler:c++11-lib gettext-runtime gettext-tools \
54
		localbase pathfix perl5 pkgconfig python shebangfix tar:bzip2
55
		ghostscript:run gl gnome \
56
		libtool localbase pathfix perl5 pkgconfig python sdl \
57
		shebangfix tar:bzip2
55
SHEBANG_FILES=	build-lives-rfx-plugin build-lives-rfx-plugin-multi \
58
SHEBANG_FILES=	build-lives-rfx-plugin build-lives-rfx-plugin-multi \
56
		smogrify tools/autolives.pl lives-plugins/plugins/encoders/*_encoder \
59
		smogrify tools/autolives.pl lives-plugins/plugins/encoders/*_encoder \
57
		lives-plugins/marcos-encoders/*encoder* \
60
		lives-plugins/marcos-encoders/*encoder* \
Lines 111-117 Link Here
111
	${INSTALL_DATA} ${DOC_FILES:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
114
	${INSTALL_DATA} ${DOC_FILES:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
112
115
113
post-install-DOXYGEN-on:
116
post-install-DOXYGEN-on:
114
	@(cd ${STAGEDIR}${PREFIX} && ${FIND} ${DOCSDIR:S|${PREFIX}/||}/html \
117
	@(cd ${STAGEDIR}${PREFIX} && ${FIND} ${DOCSDIR_REL}/html \
115
		! -type d >> ${TMPPLIST})
118
		-not -type d >> ${TMPPLIST})
116
119
117
.include <bsd.port.mk>
120
.include <bsd.port.mk>
(-)multimedia/lives/files/patch-Makefile.am (+11 lines)
Line 0 Link Here
1
--- Makefile.am.orig	2019-04-16 07:43:04 UTC
2
+++ Makefile.am
3
@@ -35,7 +35,7 @@ endif
4
 SUBDIRS = $(OSC_SUBDIRS) intl $(WEED_SUBDIRS) src m4 lives-plugins po resources
5
 PACKAGE_CAPITALISED = LiVES
6
 
7
-docdir = "$(prefix)/share/doc/$(PACKAGE)-$(VERSION)"
8
+docdir = "$(prefix)/share/doc/$(PACKAGE)"
9
 sharedir = "$(prefix)/share"
10
 
11
 if HAVE_DOXYGEN
(-)multimedia/lives/files/patch-configure (-42 lines)
Lines 1-42 Link Here
1
--- configure.orig	2015-12-23 17:59:14 UTC
2
+++ configure
3
@@ -28352,7 +28352,6 @@ if test -n "$WEED_CFLAGS"; then
4
   test $ac_status = 0; }; then
5
   pkg_cv_WEED_CFLAGS=`$PKG_CONFIG --cflags "libweed >= 0.8.0" 2>/dev/null`
6
 		      test "x$?" != "x0" && pkg_failed=yes
7
-else
8
   pkg_failed=yes
9
 fi
10
  else
11
@@ -28441,7 +28440,6 @@ if test -n "$WEED_SLICE_CFLAGS"; then
12
   test $ac_status = 0; }; then
13
   pkg_cv_WEED_SLICE_CFLAGS=`$PKG_CONFIG --cflags "libweed_slice >= 0.8.0" 2>/dev/null`
14
 		      test "x$?" != "x0" && pkg_failed=yes
15
-else
16
   pkg_failed=yes
17
 fi
18
  else
19
@@ -28531,7 +28529,6 @@ if test -n "$WEED_UTILS_CFLAGS"; then
20
   test $ac_status = 0; }; then
21
   pkg_cv_WEED_UTILS_CFLAGS=`$PKG_CONFIG --cflags "libweed-utils >= 0.8.0" 2>/dev/null`
22
 		      test "x$?" != "x0" && pkg_failed=yes
23
-else
24
   pkg_failed=yes
25
 fi
26
  else
27
@@ -28620,7 +28617,6 @@ if test -n "$WEED_COMPAT_CFLAGS"; then
28
   test $ac_status = 0; }; then
29
   pkg_cv_WEED_COMPAT_CFLAGS=`$PKG_CONFIG --cflags "libweed-compat >= 0.9.0" 2>/dev/null`
30
 		      test "x$?" != "x0" && pkg_failed=yes
31
-else
32
   pkg_failed=yes
33
 fi
34
  else
35
@@ -28709,7 +28705,6 @@ if test -n "$WEED_PLUGIN_CFLAGS"; then
36
   test $ac_status = 0; }; then
37
   pkg_cv_WEED_PLUGIN_CFLAGS=`$PKG_CONFIG --cflags "libweed-plugin >= 0.13.0" 2>/dev/null`
38
 		      test "x$?" != "x0" && pkg_failed=yes
39
-else
40
   pkg_failed=yes
41
 fi
42
  else
(-)multimedia/lives/files/patch-configure.ac (+22 lines)
Line 0 Link Here
1
--- configure.ac.orig	2019-01-08 13:49:30 UTC
2
+++ configure.ac
3
@@ -520,14 +520,16 @@ HAVE_OPENCV=false
4
 
5
 dnl check for opencv
6
 
7
-PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.1, HAVE_OPENCV=true, HAVE_OPENCV=false)
8
+PKG_CHECK_MODULES(OPENCV, opencv3 >= 2.3.1, HAVE_OPENCV=true, HAVE_OPENCV=false)
9
 
10
-if test "HAVE_OPENCV" = "true" ; then
11
-OPENCV_LIBS_ONLY_L = `pkg-config opencv --libs-only-L`
12
+if test "$HAVE_OPENCV" = "true" ; then
13
+OPENCV_LIBS_ONLY_L=`$PKG_CONFIG opencv3 --libs-only-L`
14
+OPENCV_LIBS_ONLY_OTHER=`$PKG_CONFIG opencv3 --libs-only-other`
15
 fi
16
 
17
 AC_SUBST(OPENCV_CFLAGS)
18
 AC_SUBST(OPENCV_LIBS_ONLY_L)
19
+AC_SUBST(OPENCV_LIBS_ONLY_OTHER)
20
 
21
 AM_CONDITIONAL(HAVE_OPENCV,$HAVE_OPENCV)
22
 
(-)multimedia/lives/files/patch-ffmpeg4 (-343 lines)
Lines 1-343 Link Here
1
https://sourceforge.net/p/lives/code/2742/
2
https://sourceforge.net/p/lives/code/2745/
3
4
--- configure.orig	2017-06-29 01:44:43 UTC
5
+++ configure
6
@@ -787,6 +787,8 @@ HAVE_AVFORMAT_NEW_STREAM_FALSE
7
 HAVE_AVFORMAT_NEW_STREAM_TRUE
8
 HAVE_AV_CODEC_SET_PKT_TIMEBASE_FALSE
9
 HAVE_AV_CODEC_SET_PKT_TIMEBASE_TRUE
10
+HAVE_AVCODEC_GET_NAME_FALSE
11
+HAVE_AVCODEC_GET_NAME_TRUE
12
 HAVE_AVCODEC_ALLOC_CONTEXT3_FALSE
13
 HAVE_AVCODEC_ALLOC_CONTEXT3_TRUE
14
 HAVE_AVCODEC_OPEN2_FALSE
15
@@ -26007,6 +26009,7 @@ fi
16
 
17
 HAVE_AVCODEC_OPEN2=false
18
 HAVE_AVCODEC_ALLOC_CONTEXT3=false
19
+HAVE_AVCODEC_GET_NAME=false
20
 HAVE_AV_CODEC_SET_PKT_TIMEBASE=false
21
 HAVE_AVFORMAT_NEW_STREAM=false
22
 HAVE_AVFORMAT_FIND_STREAM_INFO=false
23
@@ -26103,6 +26106,48 @@ else
24
   HAVE_AVCODEC_ALLOC_COBTEXT3=false
25
 fi
26
 
27
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for avcodec_get_name in -lavcodec" >&5
28
+$as_echo_n "checking for avcodec_get_name in -lavcodec... " >&6; }
29
+if ${ac_cv_lib_avcodec_avcodec_get_name+:} false; then :
30
+  $as_echo_n "(cached) " >&6
31
+else
32
+  ac_check_lib_save_LIBS=$LIBS
33
+LIBS="-lavcodec  $LIBS"
34
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35
+/* end confdefs.h.  */
36
+
37
+/* Override any GCC internal prototype to avoid an error.
38
+   Use char because int might match the return type of a GCC
39
+   builtin and then its argument prototype would still apply.  */
40
+#ifdef __cplusplus
41
+extern "C"
42
+#endif
43
+char avcodec_get_name ();
44
+int
45
+main ()
46
+{
47
+return avcodec_get_name ();
48
+  ;
49
+  return 0;
50
+}
51
+_ACEOF
52
+if ac_fn_c_try_link "$LINENO"; then :
53
+  ac_cv_lib_avcodec_avcodec_get_name=yes
54
+else
55
+  ac_cv_lib_avcodec_avcodec_get_name=no
56
+fi
57
+rm -f core conftest.err conftest.$ac_objext \
58
+    conftest$ac_exeext conftest.$ac_ext
59
+LIBS=$ac_check_lib_save_LIBS
60
+fi
61
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_avcodec_get_name" >&5
62
+$as_echo "$ac_cv_lib_avcodec_avcodec_get_name" >&6; }
63
+if test "x$ac_cv_lib_avcodec_avcodec_get_name" = xyes; then :
64
+  HAVE_AVCODEC_GET_NAME=true
65
+else
66
+  HAVE_AVCODEC_GET_NAME=false
67
+fi
68
+
69
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for av_codec_set_pkt_timebase in -lavcodec" >&5
70
 $as_echo_n "checking for av_codec_set_pkt_timebase in -lavcodec... " >&6; }
71
 if ${ac_cv_lib_avcodec_av_codec_set_pkt_timebase+:} false; then :
72
@@ -26525,6 +26570,14 @@ else
73
   HAVE_AVCODEC_ALLOC_CONTEXT3_FALSE=
74
 fi
75
 
76
+ if $HAVE_AVCODEC_GET_NAME; then
77
+  HAVE_AVCODEC_GET_NAME_TRUE=
78
+  HAVE_AVCODEC_GET_NAME_FALSE='#'
79
+else
80
+  HAVE_AVCODEC_GET_NAME_TRUE='#'
81
+  HAVE_AVCODEC_GET_NAME_FALSE=
82
+fi
83
+
84
  if $HAVE_AV_CODEC_SET_PKT_TIMEBASE; then
85
   HAVE_AV_CODEC_SET_PKT_TIMEBASE_TRUE=
86
   HAVE_AV_CODEC_SET_PKT_TIMEBASE_FALSE='#'
87
@@ -29545,6 +29598,10 @@ Usually this means the macro was only invoked conditio
88
 fi
89
 if test -z "${HAVE_AVCODEC_ALLOC_CONTEXT3_TRUE}" && test -z "${HAVE_AVCODEC_ALLOC_CONTEXT3_FALSE}"; then
90
   as_fn_error $? "conditional \"HAVE_AVCODEC_ALLOC_CONTEXT3\" was never defined.
91
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
92
+fi
93
+if test -z "${HAVE_AVCODEC_GET_NAME_TRUE}" && test -z "${HAVE_AVCODEC_GET_NAME_FALSE}"; then
94
+  as_fn_error $? "conditional \"HAVE_AVCODEC_GET_NAME\" was never defined.
95
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
96
 fi
97
 if test -z "${HAVE_AV_CODEC_SET_PKT_TIMEBASE_TRUE}" && test -z "${HAVE_AV_CODEC_SET_PKT_TIMEBASE_FALSE}"; then
98
--- lives-plugins/plugins/decoders/asf_decoder.c.orig	2017-05-24 02:07:10 UTC
99
+++ lives-plugins/plugins/decoders/asf_decoder.c
100
@@ -439,7 +439,7 @@ static int get_next_video_packet(const lives_clip_data
101
 
102
 
103
   if (tdts == -1) {
104
-    priv->avpkt.size = priv->def_packet_size + FF_INPUT_BUFFER_PADDING_SIZE;
105
+    priv->avpkt.size = priv->def_packet_size + AV_INPUT_BUFFER_PADDING_SIZE;
106
     priv->avpkt.data = malloc(priv->avpkt.size);
107
     memset(priv->avpkt.data, 0, priv->avpkt.size);
108
   }
109
@@ -714,10 +714,10 @@ static int get_next_video_packet(const lives_clip_data
110
             fprintf(stderr, "asf_decoder: buffer overflow reading vid packet (%d + %d > %d),\n increasing buffer size\n",
111
                     asf->packet_frag_offset, asf->packet_frag_size, priv->avpkt.size);
112
 
113
-            priv->avpkt.data = realloc(priv->avpkt.data, priv->def_packet_size * 2 + FF_INPUT_BUFFER_PADDING_SIZE);
114
+            priv->avpkt.data = realloc(priv->avpkt.data, priv->def_packet_size * 2 + AV_INPUT_BUFFER_PADDING_SIZE);
115
             memset(priv->avpkt.data + priv->avpkt.size, 0, priv->def_packet_size);
116
             priv->def_packet_size *= 2;
117
-            priv->avpkt.size = priv->def_packet_size + FF_INPUT_BUFFER_PADDING_SIZE;
118
+            priv->avpkt.size = priv->def_packet_size + AV_INPUT_BUFFER_PADDING_SIZE;
119
           }
120
 
121
           if (read(priv->fd, priv->avpkt.data + asf->packet_frag_offset, asf->packet_frag_size)
122
@@ -1436,8 +1436,8 @@ seek_skip:
123
           if (!got_vidst) {
124
             priv->st->codec->extradata_size = size - 40;
125
 
126
-            priv->st->codec->extradata = malloc(priv->st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
127
-            memset(priv->st->codec->extradata, 0, priv->st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
128
+            priv->st->codec->extradata = malloc(priv->st->codec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
129
+            memset(priv->st->codec->extradata, 0, priv->st->codec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
130
 
131
             if (read(priv->fd, priv->st->codec->extradata,
132
                      priv->st->codec->extradata_size) < priv->st->codec->extradata_size) {
133
--- lives-plugins/plugins/decoders/avformat_decoder.c.orig	2017-05-12 12:35:30 UTC
134
+++ lives-plugins/plugins/decoders/avformat_decoder.c
135
@@ -368,8 +368,12 @@ skip_init:
136
 
137
       get_samps_and_signed(cc->sample_fmt, &cdata->asamps, &cdata->asigned);
138
 
139
-      sprintf(cdata->audio_name, "%s", cc->codec_name);
140
-
141
+#ifdef HAVE_AVCODEC_GET_NAME
142
+      sprintf(cdata->audio_name, "%s", avcodec_get_name(cc->codec_id));
143
+#else
144
+      sprintf(cdata->audio_name, "%s", cc->codec->name);
145
+#endif
146
+      
147
       priv->astream = i;
148
       break;
149
 
150
@@ -408,7 +412,11 @@ skip_init:
151
         return FALSE;
152
       }
153
 
154
-      sprintf(cdata->video_name, "%s", cc->codec_name);
155
+#ifdef HAVE_AVCODEC_GET_NAME
156
+      sprintf(cdata->video_name, "%s", avcodec_get_name(cc->codec_id));
157
+#else
158
+      sprintf(cdata->video_name, "%s", cc->codec->name);
159
+#endif
160
 
161
       cdata->par = cc->sample_aspect_ratio.num / cc->sample_aspect_ratio.den;
162
       if (cdata->par == 0) cdata->par = 1;
163
--- lives-plugins/plugins/decoders/flv_decoder.c.orig	2017-05-11 22:46:57 UTC
164
+++ lives-plugins/plugins/decoders/flv_decoder.c
165
@@ -465,7 +465,7 @@ static int flv_get_extradata(lives_clip_data_t *cdata,
166
   lives_flv_priv_t *priv = cdata->priv;
167
 
168
   av_free(priv->ctx->extradata);
169
-  priv->ctx->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
170
+  priv->ctx->extradata = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE);
171
   if (priv->ctx->extradata == NULL) return AVERROR(ENOMEM);
172
   priv->ctx->extradata_size = size;
173
   dummy = read(priv->fd, priv->ctx->extradata, priv->ctx->extradata_size);
174
@@ -1143,12 +1143,12 @@ static boolean attach_stream(lives_clip_data_t *cdata,
175
 
176
   if (isclone) return TRUE;
177
 
178
-  pack.data = malloc(pack.size - priv->pack_offset + FF_INPUT_BUFFER_PADDING_SIZE);
179
+  pack.data = malloc(pack.size - priv->pack_offset + AV_INPUT_BUFFER_PADDING_SIZE);
180
 
181
   av_init_packet(&priv->avpkt);
182
 
183
   priv->avpkt.size = read(priv->fd, pack.data, pack.size - priv->pack_offset);
184
-  memset(pack.data + priv->avpkt.size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
185
+  memset(pack.data + priv->avpkt.size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
186
   priv->input_position += pack.size + 4;
187
   priv->avpkt.data = pack.data;
188
   priv->avpkt.dts = priv->avpkt.pts = pack.dts;
189
@@ -1206,10 +1206,10 @@ static boolean attach_stream(lives_clip_data_t *cdata,
190
             continue;
191
           }
192
 
193
-          pack.data = malloc(pack.size - priv->pack_offset + FF_INPUT_BUFFER_PADDING_SIZE);
194
+          pack.data = malloc(pack.size - priv->pack_offset + AV_INPUT_BUFFER_PADDING_SIZE);
195
           if (priv->pack_offset != 5) lseek(priv->fd, priv->pack_offset - 5, SEEK_CUR);
196
           priv->avpkt.size = read(priv->fd, pack.data, pack.size - priv->pack_offset);
197
-          memset(pack.data + priv->avpkt.size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
198
+          memset(pack.data + priv->avpkt.size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
199
           priv->avpkt.data = pack.data;
200
           break;
201
         }
202
@@ -1709,12 +1709,12 @@ boolean get_frame(const lives_clip_data_t *cdata, int6
203
         continue;
204
       }
205
 
206
-      pack.data = malloc(pack.size - priv->pack_offset + FF_INPUT_BUFFER_PADDING_SIZE);
207
+      pack.data = malloc(pack.size - priv->pack_offset + AV_INPUT_BUFFER_PADDING_SIZE);
208
 
209
       if (priv->pack_offset != 1) lseek(priv->fd, priv->pack_offset - 1, SEEK_CUR);
210
 
211
       priv->avpkt.size = read(priv->fd, pack.data, pack.size - priv->pack_offset);
212
-      memset(pack.data + priv->avpkt.size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
213
+      memset(pack.data + priv->avpkt.size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
214
       priv->avpkt.data = pack.data;
215
       priv->avpkt.dts = priv->avpkt.pts = pack.dts;
216
 
217
--- lives-plugins/plugins/decoders/libav_helper.h.orig	2017-05-12 05:48:30 UTC
218
+++ lives-plugins/plugins/decoders/libav_helper.h
219
@@ -117,6 +117,21 @@ static UNUSED void av_set_pts_info(AVStream *s, int pt
220
 #define av_get_bits_per_sample(a) (av_get_bytes_per_sample(a) * 8)
221
 #endif
222
 
223
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(56, 56, 0)
224
+#ifndef FF_INPUT_BUFFER_PADDING_SIZE
225
+#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_MIN_SIZE
226
+#else
227
+#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE
228
+#endif
229
+#else
230
+#ifndef AV_INPUT_BUFFER_PADDING_SIZE
231
+#define AV_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_MIN_SIZE
232
+#endif
233
+#endif
234
+
235
+#ifndef AV_CODEC_FLAG_GLOBAL_HEADER
236
+#define AV_CODEC_FLAG_GLOBAL_HEADER CODEC_FLAG_GLOBAL_HEADER
237
+#endif
238
 
239
 
240
 #endif // HAVE_LIBAV_LIBS
241
--- lives-plugins/plugins/decoders/mkv_decoder.c.orig	2017-05-12 08:39:45 UTC
242
+++ lives-plugins/plugins/decoders/mkv_decoder.c
243
@@ -883,7 +883,7 @@ static void matroska_fix_ass_packet(MatroskaDemuxConte
244
     es = ec /   100;
245
     ec -=    100 * es;
246
     *ptr++ = '\0';
247
-    len = 50 + end - ptr + FF_INPUT_BUFFER_PADDING_SIZE;
248
+    len = 50 + end - ptr + AV_INPUT_BUFFER_PADDING_SIZE;
249
     if (!(line = malloc(len)))
250
       return;
251
     snprintf(line, len, "Dialogue: %s,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,%s\r\n",
252
@@ -1544,7 +1544,7 @@ static int lives_mkv_read_header(lives_clip_data_t *cd
253
         st->codec->extradata_size = extradata_size;
254
       } else if (track->codec_priv.data && track->codec_priv.size > 0) {
255
         st->codec->extradata = calloc(track->codec_priv.size +
256
-                                      FF_INPUT_BUFFER_PADDING_SIZE, 1);
257
+                                      AV_INPUT_BUFFER_PADDING_SIZE, 1);
258
         if (st->codec->extradata == NULL) {
259
           fprintf(stderr,
260
                   "mkv_decoder: Out of memory\n");
261
--- lives-plugins/plugins/decoders/mpegts_decoder.c.orig	2017-05-12 12:37:42 UTC
262
+++ lives-plugins/plugins/decoders/mpegts_decoder.c
263
@@ -125,7 +125,7 @@ static inline void skip_bits(GetBitContext *s, int n) 
264
 
265
 /**
266
  * init GetBitContext.
267
- * @param buffer bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE bytes larger than the actual read bits
268
+ * @param buffer bitstream buffer, must be AV_INPUT_BUFFER_PADDING_SIZE bytes larger than the actual read bits
269
  * because some optimized bitstream readers read 32 or 64 bit at once and could read over the end
270
  * @param bit_size the size of the buffer in bits
271
  *
272
@@ -337,6 +337,7 @@ struct MpegTSContext {
273
   MpegTSFilter *pids[NB_PID_MAX];
274
 };
275
 
276
+/*
277
 static const AVOption options[] = {
278
   {
279
     "compute_pcr", "Compute exact PCR for each transport stream packet.", offsetof(MpegTSContext, mpeg2ts_compute_pcr), AV_OPT_TYPE_INT,
280
@@ -344,6 +345,7 @@ static const AVOption options[] = {
281
   },
282
   { NULL },
283
 };
284
+*/
285
 
286
 /* TS stream handling */
287
 
288
@@ -1035,7 +1037,7 @@ static void new_pes_packet(PESContext *pes, AVPacket *
289
     fprintf(stderr, "mpegts_decoder: PES packet size mismatch\n");
290
     //pes->flags |= AV_PKT_FLAG_CORRUPT;
291
   }
292
-  memset(pkt->data + pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
293
+  memset(pkt->data + pkt->size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
294
 
295
   // Separate out the AC3 substream from an HDMV combined TrueHD/AC3 PID
296
   if (pes->sub_st && pes->stream_type == 0x83 && pes->extended_stream_id == 0x76)
297
@@ -1192,7 +1194,7 @@ static int mpegts_push_data(lives_clip_data_t *cdata, 
298
             pes->total_size = MAX_PES_PAYLOAD;
299
 
300
           /* allocate pes buffer */
301
-          pes->buffer = av_malloc(pes->total_size + FF_INPUT_BUFFER_PADDING_SIZE);
302
+          pes->buffer = av_malloc(pes->total_size + AV_INPUT_BUFFER_PADDING_SIZE);
303
           if (!pes->buffer)
304
             return AVERROR(ENOMEM);
305
 
306
@@ -1289,7 +1291,7 @@ skip:
307
         if (pes->data_index > 0 && pes->data_index + buf_size > pes->total_size) {
308
           new_pes_packet(pes, ts->pkt);
309
           pes->total_size = MAX_PES_PAYLOAD;
310
-          pes->buffer = av_malloc(pes->total_size + FF_INPUT_BUFFER_PADDING_SIZE);
311
+          pes->buffer = av_malloc(pes->total_size + AV_INPUT_BUFFER_PADDING_SIZE);
312
           if (!pes->buffer)
313
             return AVERROR(ENOMEM);
314
           ts->stop_parse = 1;
315
@@ -1454,7 +1456,7 @@ int ff_mp4_read_dec_config_descr(lives_clip_data_t *cd
316
     if (!len || (uint64_t)len > (1 << 30))
317
       return -1;
318
     av_free(st->codec->extradata);
319
-    st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
320
+    st->codec->extradata = av_mallocz(len + AV_INPUT_BUFFER_PADDING_SIZE);
321
     if (!st->codec->extradata)
322
       return AVERROR(ENOMEM);
323
     memcpy(st->codec->extradata, p, len);
324
@@ -1802,7 +1804,7 @@ int ff_parse_mpeg2_descriptor(lives_clip_data_t *cdata
325
       //if (st->codec->extradata_size == 4 && memcmp(st->codec->extradata, *pp, 4))
326
       //av_log_ask_for_sample(fc, "DVB sub with multiple IDs\n");
327
       //} else {
328
-      st->codec->extradata = av_malloc(4 + FF_INPUT_BUFFER_PADDING_SIZE);
329
+      st->codec->extradata = av_malloc(4 + AV_INPUT_BUFFER_PADDING_SIZE);
330
       if (st->codec->extradata) {
331
         st->codec->extradata_size = 4;
332
         memcpy(st->codec->extradata, *pp, 4);
333
@@ -3141,8 +3143,8 @@ skip_det:
334
 
335
   priv->codec = codec;
336
 
337
-  if (codec->capabilities & CODEC_CAP_TRUNCATED)
338
-    ctx->flags |= CODEC_FLAG_TRUNCATED;
339
+  if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
340
+    ctx->flags |= AV_CODEC_FLAG_TRUNCATED;
341
 
342
   // re-scan with avcodec; priv->data_start holds video data start position
343
 
(-)multimedia/lives/files/patch-lives-plugins_weed-plugins_Makefile.am (+12 lines)
Line 0 Link Here
1
--- lives-plugins/weed-plugins/Makefile.am.orig	2019-04-14 20:00:14 UTC
2
+++ lives-plugins/weed-plugins/Makefile.am
3
@@ -85,7 +85,8 @@ endif
4
 
5
 if HAVE_OPENCV
6
 farneback_analyser_libs = farneback_analyser.la
7
-farneback_analyser_la_LDFLAGS = $(AM_LDFLAGS) $(OPENCV_LIBS_ONLY_L) -lopencv_core -lopencv_video
8
+farneback_analyser_la_LDFLAGS = $(AM_LDFLAGS) $(OPENCV_LIBS_ONLY_L) $(OPENCV_LIBS_ONLY_OTHER) -lopencv_core -lopencv_video
9
+farneback_analyser_la_CXXFLAGS = $(OPENCV_CFLAGS)
10
 farneback_analyser_la_CPPFLAGS = $(AM_CPPFLAGS)
11
 farneback_analyser_la_SOURCES = farneback_analyser.cpp
12
 
(-)multimedia/lives/files/patch-lives-plugins_weed-plugins_gdk_Makefile.am (+13 lines)
Line 0 Link Here
1
--- lives-plugins/weed-plugins/gdk/Makefile.am.orig	2019-04-15 10:55:37 UTC
2
+++ lives-plugins/weed-plugins/gdk/Makefile.am
3
@@ -59,8 +59,8 @@ EXTRA_DIST=data icons
4
 
5
 install-data-local:
6
 	mkdir -p "$(DESTDIR)$(fxpluginslibdir)"
7
-	cp -rf data/ "$(DESTDIR)$(fxpluginslibdir)" && chmod -R a+r "$(DESTDIR)$(fxpluginslibdir)/data/"
8
-	cp -rf icons/ "$(DESTDIR)$(fxpluginslibdir)" && chmod -R a+r "$(DESTDIR)$(fxpluginslibdir)/icons/"
9
+	cp -rf data "$(DESTDIR)$(fxpluginslibdir)" && chmod -R a+r "$(DESTDIR)$(fxpluginslibdir)/data"
10
+	cp -rf icons "$(DESTDIR)$(fxpluginslibdir)" && chmod -R a+r "$(DESTDIR)$(fxpluginslibdir)/icons"
11
 	$(MAKE) -i install-data-local-remove-vcs-files
12
 
13
 install-data-local-remove-vcs-files:
(-)multimedia/lives/pkg-plist (-16 / +17 lines)
Lines 76-86 Link Here
76
lib/lives/plugins/effects/realtime/weed/colorkey.so
76
lib/lives/plugins/effects/realtime/weed/colorkey.so
77
lib/lives/plugins/effects/realtime/weed/comic.so
77
lib/lives/plugins/effects/realtime/weed/comic.so
78
lib/lives/plugins/effects/realtime/weed/compositor.so
78
lib/lives/plugins/effects/realtime/weed/compositor.so
79
lib/lives/plugins/effects/realtime/weed/data/fourKlives/songs/examples.txt
80
lib/lives/plugins/effects/realtime/weed/data/fourKlives/songs/modulations.txt
81
lib/lives/plugins/effects/realtime/weed/data/fourKlives/songs/newlives.txt
82
lib/lives/plugins/effects/realtime/weed/data/fourKlives/songs/regrlives.txt
83
lib/lives/plugins/effects/realtime/weed/data/fourKlives/songs/roselives.txt
84
lib/lives/plugins/effects/realtime/weed/data_processor.so
79
lib/lives/plugins/effects/realtime/weed/data_processor.so
85
lib/lives/plugins/effects/realtime/weed/data_unpacker.so
80
lib/lives/plugins/effects/realtime/weed/data_unpacker.so
86
lib/lives/plugins/effects/realtime/weed/deinterlace.so
81
lib/lives/plugins/effects/realtime/weed/deinterlace.so
Lines 88-95 Link Here
88
lib/lives/plugins/effects/realtime/weed/farneback_analyser.so
83
lib/lives/plugins/effects/realtime/weed/farneback_analyser.so
89
lib/lives/plugins/effects/realtime/weed/fg_bg_removal.so
84
lib/lives/plugins/effects/realtime/weed/fg_bg_removal.so
90
lib/lives/plugins/effects/realtime/weed/fireTV.so
85
lib/lives/plugins/effects/realtime/weed/fireTV.so
86
%%FREI0R%%lib/lives/plugins/effects/realtime/weed/frei0r/frei0r.so
91
lib/lives/plugins/effects/realtime/weed/fourKlives.so
87
lib/lives/plugins/effects/realtime/weed/fourKlives.so
92
%%FREI0R%%lib/lives/plugins/effects/realtime/weed/frei0r/frei0r.so
88
lib/lives/plugins/effects/realtime/weed/fourKlives/songs/examples.txt
89
lib/lives/plugins/effects/realtime/weed/fourKlives/songs/modulations.txt
90
lib/lives/plugins/effects/realtime/weed/fourKlives/songs/newlives.txt
91
lib/lives/plugins/effects/realtime/weed/fourKlives/songs/regrlives.txt
92
lib/lives/plugins/effects/realtime/weed/fourKlives/songs/roselives.txt
93
lib/lives/plugins/effects/realtime/weed/gdk_fast_resize.so
93
lib/lives/plugins/effects/realtime/weed/gdk_fast_resize.so
94
lib/lives/plugins/effects/realtime/weed/haar_analyser.so
94
lib/lives/plugins/effects/realtime/weed/haar_analyser.so
95
lib/lives/plugins/effects/realtime/weed/haip.so
95
lib/lives/plugins/effects/realtime/weed/haip.so
Lines 200-211 Link Here
200
lib/lives/plugins/playback/audiostream/audiostreamer.pl
200
lib/lives/plugins/playback/audiostream/audiostreamer.pl
201
lib/lives/plugins/playback/video/SDL.so
201
lib/lives/plugins/playback/video/SDL.so
202
lib/lives/plugins/playback/video/icecast_output.so
202
lib/lives/plugins/playback/video/icecast_output.so
203
lib/lives/plugins/playback/video/libav_stream.so
203
lib/lives/plugins/playback/video/lives2lives_stream.so
204
lib/lives/plugins/playback/video/lives2lives_stream.so
204
lib/lives/plugins/playback/video/libav_stream.so
205
lib/lives/plugins/playback/video/oggstream.so
205
lib/lives/plugins/playback/video/oggstream.so
206
lib/lives/plugins/playback/video/openGL.so
206
lib/lives/plugins/playback/video/openGL.so
207
lib/lives/plugins/playback/video/vloopback.so
207
lib/lives/plugins/playback/video/vloopback.so
208
lib/lives/plugins/playback/video/vloopback2.so
209
lib/lives/plugins/playback/video/yuv4mpeg_stream.so
208
lib/lives/plugins/playback/video/yuv4mpeg_stream.so
210
libdata/pkgconfig/libweed-compat.pc
209
libdata/pkgconfig/libweed-compat.pc
211
libdata/pkgconfig/libweed-plugin.pc
210
libdata/pkgconfig/libweed-plugin.pc
Lines 214-226 Link Here
214
libdata/pkgconfig/libweed_slice.pc
213
libdata/pkgconfig/libweed_slice.pc
215
share/app-install/icons/lives.png
214
share/app-install/icons/lives.png
216
share/applications/LiVES.desktop
215
share/applications/LiVES.desktop
217
share/icons/hicolor/128x128/apps/lives.png
218
share/icons/hicolor/16x16/apps/lives.png
219
share/icons/hicolor/22x22/apps/lives.png
220
share/icons/hicolor/256x256/apps/lives.png
221
share/icons/hicolor/32x32/apps/lives.png
222
share/icons/hicolor/64x64/apps/lives.png
223
share/pixmaps/lives.png
224
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
216
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
225
%%PORTDOCS%%%%DOCSDIR%%/BUGS
217
%%PORTDOCS%%%%DOCSDIR%%/BUGS
226
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
218
%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
Lines 231-241 Link Here
231
%%PORTDOCS%%%%DOCSDIR%%/README.multi_encoder
223
%%PORTDOCS%%%%DOCSDIR%%/README.multi_encoder
232
%%PORTDOCS%%%%DOCSDIR%%/RFX.spec
224
%%PORTDOCS%%%%DOCSDIR%%/RFX.spec
233
%%PORTDOCS%%%%DOCSDIR%%/clip_format.txt
225
%%PORTDOCS%%%%DOCSDIR%%/clip_format.txt
226
%%PORTDOCS%%%%DOCSDIR%%/c++-bindings.odt
234
%%PORTDOCS%%%%DOCSDIR%%/lives-OMC.txt
227
%%PORTDOCS%%%%DOCSDIR%%/lives-OMC.txt
235
%%PORTDOCS%%%%DOCSDIR%%/rfxbuilder.odt
228
%%PORTDOCS%%%%DOCSDIR%%/rfxbuilder.odt
236
%%PORTDOCS%%%%DOCSDIR%%/weedevents.txt
229
%%PORTDOCS%%%%DOCSDIR%%/weedevents.txt
237
%%PORTDOCS%%%%DOCSDIR%%/weedspec.txt
230
%%PORTDOCS%%%%DOCSDIR%%/weedspec.txt
231
share/icons/hicolor/128x128/apps/lives.png
232
share/icons/hicolor/16x16/apps/lives.png
233
share/icons/hicolor/22x22/apps/lives.png
234
share/icons/hicolor/256x256/apps/lives.png
235
share/icons/hicolor/32x32/apps/lives.png
238
share/icons/hicolor/48x48/apps/lives.png
236
share/icons/hicolor/48x48/apps/lives.png
237
share/icons/hicolor/64x64/apps/lives.png
239
%%DATADIR%%/default.keymap
238
%%DATADIR%%/default.keymap
240
%%DATADIR%%/icons/audio.png
239
%%DATADIR%%/icons/audio.png
241
%%DATADIR%%/icons/fullscreen.png
240
%%DATADIR%%/icons/fullscreen.png
Lines 372-377 Link Here
372
%%NLS%%share/locale/uk/LC_MESSAGES/lives.mo
371
%%NLS%%share/locale/uk/LC_MESSAGES/lives.mo
373
%%NLS%%share/locale/uz/LC_MESSAGES/lives.mo
372
%%NLS%%share/locale/uz/LC_MESSAGES/lives.mo
374
%%NLS%%share/locale/zh_CN/LC_MESSAGES/lives.mo
373
%%NLS%%share/locale/zh_CN/LC_MESSAGES/lives.mo
374
share/pixmaps/lives.png
375
share/pixmaps/lives.xpm
375
share/pixmaps/lives.xpm
376
@dir lib/lives/plugins/effects/realtime/weed/data
377
@dir lib/lives/plugins/effects/realtime/weed/icons
376
@dir %%DATADIR%%/devicemaps
378
@dir %%DATADIR%%/devicemaps
377
@dir lib/lives/plugins/effects/realtime/weed/icons

Return to bug 237320