commit 4cefa42ac25f14a2be76d40449733ade316ffd4d
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Fri Jan 19 19:06:09 2018 +0000
Add build fix for ffmpeg-3.5 git
ffmpeg35_buildfix.patch | 200 ++++++++++++++++++++++++++++++++++++++++++++++++
lives.spec | 7 +-
2 files changed, 206 insertions(+), 1 deletion(-)
---
diff --git a/ffmpeg35_buildfix.patch b/ffmpeg35_buildfix.patch
new file mode 100644
index 0000000..6beefb5
--- /dev/null
+++ b/ffmpeg35_buildfix.patch
@@ -0,0 +1,200 @@
+--- a/lives-plugins/plugins/decoders/asf_decoder.c
++++ b/lives-plugins/plugins/decoders/asf_decoder.c
+@@ -439,7 +439,7 @@
+
+
+ if (tdts == -1) {
+- priv->avpkt.size = priv->def_packet_size + FF_INPUT_BUFFER_PADDING_SIZE;
++ priv->avpkt.size = priv->def_packet_size + AV_INPUT_BUFFER_PADDING_SIZE;
+ priv->avpkt.data = malloc(priv->avpkt.size);
+ memset(priv->avpkt.data, 0, priv->avpkt.size);
+ }
+@@ -714,10 +714,10 @@
+ fprintf(stderr, "asf_decoder: buffer overflow reading vid packet (%d +
%d > %d),\n increasing buffer size\n",
+ asf->packet_frag_offset, asf->packet_frag_size,
priv->avpkt.size);
+
+- priv->avpkt.data = realloc(priv->avpkt.data, priv->def_packet_size
* 2 + FF_INPUT_BUFFER_PADDING_SIZE);
++ priv->avpkt.data = realloc(priv->avpkt.data, priv->def_packet_size
* 2 + AV_INPUT_BUFFER_PADDING_SIZE);
+ memset(priv->avpkt.data + priv->avpkt.size, 0,
priv->def_packet_size);
+ priv->def_packet_size *= 2;
+- priv->avpkt.size = priv->def_packet_size +
FF_INPUT_BUFFER_PADDING_SIZE;
++ priv->avpkt.size = priv->def_packet_size +
AV_INPUT_BUFFER_PADDING_SIZE;
+ }
+
+ if (read(priv->fd, priv->avpkt.data + asf->packet_frag_offset,
asf->packet_frag_size)
+@@ -1436,8 +1436,8 @@
+ if (!got_vidst) {
+ priv->st->codec->extradata_size = size - 40;
+
+- priv->st->codec->extradata =
malloc(priv->st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
+- memset(priv->st->codec->extradata, 0,
priv->st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
++ priv->st->codec->extradata =
malloc(priv->st->codec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
++ memset(priv->st->codec->extradata, 0,
priv->st->codec->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
+
+ if (read(priv->fd, priv->st->codec->extradata,
+ priv->st->codec->extradata_size) <
priv->st->codec->extradata_size) {
+
+--- a/lives-plugins/plugins/decoders/mpegts_decoder.c
++++ b/lives-plugins/plugins/decoders/mpegts_decoder.c
+@@ -125,7 +125,7 @@
+
+ /**
+ * init GetBitContext.
+- * @param buffer bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE bytes larger
than the actual read bits
++ * @param buffer bitstream buffer, must be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
than the actual read bits
+ * because some optimized bitstream readers read 32 or 64 bit at once and could read
over the end
+ * @param bit_size the size of the buffer in bits
+ *
+@@ -1035,7 +1035,7 @@
+ fprintf(stderr, "mpegts_decoder: PES packet size mismatch\n");
+ //pes->flags |= AV_PKT_FLAG_CORRUPT;
+ }
+- memset(pkt->data + pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset(pkt->data + pkt->size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+
+ // Separate out the AC3 substream from an HDMV combined TrueHD/AC3 PID
+ if (pes->sub_st && pes->stream_type == 0x83 &&
pes->extended_stream_id == 0x76)
+@@ -1192,7 +1192,7 @@
+ pes->total_size = MAX_PES_PAYLOAD;
+
+ /* allocate pes buffer */
+- pes->buffer = av_malloc(pes->total_size +
FF_INPUT_BUFFER_PADDING_SIZE);
++ pes->buffer = av_malloc(pes->total_size +
AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!pes->buffer)
+ return AVERROR(ENOMEM);
+
+@@ -1289,7 +1289,7 @@
+ if (pes->data_index > 0 && pes->data_index + buf_size >
pes->total_size) {
+ new_pes_packet(pes, ts->pkt);
+ pes->total_size = MAX_PES_PAYLOAD;
+- pes->buffer = av_malloc(pes->total_size +
FF_INPUT_BUFFER_PADDING_SIZE);
++ pes->buffer = av_malloc(pes->total_size +
AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!pes->buffer)
+ return AVERROR(ENOMEM);
+ ts->stop_parse = 1;
+@@ -1454,7 +1454,7 @@
+ if (!len || (uint64_t)len > (1 << 30))
+ return -1;
+ av_free(st->codec->extradata);
+- st->codec->extradata = av_mallocz(len + FF_INPUT_BUFFER_PADDING_SIZE);
++ st->codec->extradata = av_mallocz(len + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (!st->codec->extradata)
+ return AVERROR(ENOMEM);
+ memcpy(st->codec->extradata, p, len);
+@@ -1802,7 +1802,7 @@
+ //if (st->codec->extradata_size == 4 &&
memcmp(st->codec->extradata, *pp, 4))
+ //av_log_ask_for_sample(fc, "DVB sub with multiple IDs\n");
+ //} else {
+- st->codec->extradata = av_malloc(4 + FF_INPUT_BUFFER_PADDING_SIZE);
++ st->codec->extradata = av_malloc(4 + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (st->codec->extradata) {
+ st->codec->extradata_size = 4;
+ memcpy(st->codec->extradata, *pp, 4);
+@@ -3141,8 +3141,8 @@
+
+ priv->codec = codec;
+
+- if (codec->capabilities & CODEC_CAP_TRUNCATED)
+- ctx->flags |= CODEC_FLAG_TRUNCATED;
++ if (codec->capabilities & AV_CODEC_CAP_TRUNCATED)
++ ctx->flags |= AV_CODEC_FLAG_TRUNCATED;
+
+ // re-scan with avcodec; priv->data_start holds video data start position
+
+--- a/lives-plugins/plugins/decoders/flv_decoder.c
++++ b/lives-plugins/plugins/decoders/flv_decoder.c
+@@ -465,7 +465,7 @@
+ lives_flv_priv_t *priv = cdata->priv;
+
+ av_free(priv->ctx->extradata);
+- priv->ctx->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
++ priv->ctx->extradata = av_mallocz(size + AV_INPUT_BUFFER_PADDING_SIZE);
+ if (priv->ctx->extradata == NULL) return AVERROR(ENOMEM);
+ priv->ctx->extradata_size = size;
+ dummy = read(priv->fd, priv->ctx->extradata,
priv->ctx->extradata_size);
+@@ -1143,12 +1143,12 @@
+
+ if (isclone) return TRUE;
+
+- pack.data = malloc(pack.size - priv->pack_offset + FF_INPUT_BUFFER_PADDING_SIZE);
++ pack.data = malloc(pack.size - priv->pack_offset + AV_INPUT_BUFFER_PADDING_SIZE);
+
+ av_init_packet(&priv->avpkt);
+
+ priv->avpkt.size = read(priv->fd, pack.data, pack.size - priv->pack_offset);
+- memset(pack.data + priv->avpkt.size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset(pack.data + priv->avpkt.size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+ priv->input_position += pack.size + 4;
+ priv->avpkt.data = pack.data;
+ priv->avpkt.dts = priv->avpkt.pts = pack.dts;
+@@ -1206,10 +1206,10 @@
+ continue;
+ }
+
+- pack.data = malloc(pack.size - priv->pack_offset +
FF_INPUT_BUFFER_PADDING_SIZE);
++ pack.data = malloc(pack.size - priv->pack_offset +
AV_INPUT_BUFFER_PADDING_SIZE);
+ if (priv->pack_offset != 5) lseek(priv->fd, priv->pack_offset - 5,
SEEK_CUR);
+ priv->avpkt.size = read(priv->fd, pack.data, pack.size -
priv->pack_offset);
+- memset(pack.data + priv->avpkt.size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset(pack.data + priv->avpkt.size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+ priv->avpkt.data = pack.data;
+ break;
+ }
+@@ -1709,12 +1709,12 @@
+ continue;
+ }
+
+- pack.data = malloc(pack.size - priv->pack_offset +
FF_INPUT_BUFFER_PADDING_SIZE);
++ pack.data = malloc(pack.size - priv->pack_offset +
AV_INPUT_BUFFER_PADDING_SIZE);
+
+ if (priv->pack_offset != 1) lseek(priv->fd, priv->pack_offset - 1,
SEEK_CUR);
+
+ priv->avpkt.size = read(priv->fd, pack.data, pack.size -
priv->pack_offset);
+- memset(pack.data + priv->avpkt.size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
++ memset(pack.data + priv->avpkt.size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+ priv->avpkt.data = pack.data;
+ priv->avpkt.dts = priv->avpkt.pts = pack.dts;
+
+
+--- a/lives-plugins/plugins/decoders/mkv_decoder.c
++++ b/lives-plugins/plugins/decoders/mkv_decoder.c
+@@ -883,7 +883,7 @@
+ es = ec / 100;
+ ec -= 100 * es;
+ *ptr++ = '\0';
+- len = 50 + end - ptr + FF_INPUT_BUFFER_PADDING_SIZE;
++ len = 50 + end - ptr + AV_INPUT_BUFFER_PADDING_SIZE;
+ if (!(line = malloc(len)))
+ return;
+ snprintf(line, len, "Dialogue:
%s,%d:%02d:%02d.%02d,%d:%02d:%02d.%02d,%s\r\n",
+@@ -1544,7 +1544,7 @@
+ st->codec->extradata_size = extradata_size;
+ } else if (track->codec_priv.data && track->codec_priv.size > 0)
{
+ st->codec->extradata = calloc(track->codec_priv.size +
+- FF_INPUT_BUFFER_PADDING_SIZE, 1);
++ AV_INPUT_BUFFER_PADDING_SIZE, 1);
+ if (st->codec->extradata == NULL) {
+ fprintf(stderr,
+ "mkv_decoder: Out of memory\n");
+
+--- a/lives-plugins/plugins/decoders/avformat_decoder.c
++++ b/lives-plugins/plugins/decoders/avformat_decoder.c
+@@ -368,7 +368,7 @@
+
+ get_samps_and_signed(cc->sample_fmt, &cdata->asamps,
&cdata->asigned);
+
+- sprintf(cdata->audio_name, "%s", cc->codec_name);
++ sprintf(cdata->audio_name, "%s", cc->codec_type);
+
+ priv->astream = i;
+ break;
+@@ -408,7 +408,7 @@
+ return FALSE;
+ }
+
+- sprintf(cdata->video_name, "%s", cc->codec_name);
++ sprintf(cdata->video_name, "%s", cc->codec_type);
+
+ cdata->par = cc->sample_aspect_ratio.num / cc->sample_aspect_ratio.den;
+ if (cdata->par == 0) cdata->par = 1;
+
diff --git a/lives.spec b/lives.spec
index 8882abe..0166270 100644
--- a/lives.spec
+++ b/lives.spec
@@ -13,13 +13,14 @@
Name: lives
Version: 2.8.7
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Video editor and VJ tool
License: GPLv3+ and LGPLv3+
URL:
http://lives-video.com
Source0:
http://lives-video.com/releases/LiVES-%{version}.tar.bz2
## Appdata file
Source1: LiVES.appdata.xml
+Patch0: ffmpeg35_buildfix.patch
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(sdl)
@@ -92,6 +93,7 @@ It is small in size, yet it has many advanced features.
%prep
%setup -q -n lives-%{version}
+%patch0 -p1
##Remove spurious executable permissions
for i in `find . -type f \( -name "*.c" -o -name "*.h" -o -name
"*.txt" \)`; do
@@ -184,6 +186,9 @@ appstream-util validate-relax --nonet
%{buildroot}%{_datadir}/appdata/*.appdata.
%{_datadir}/appdata/LiVES.appdata.xml
%changelog
+* Fri Jan 19 2018 Leigh Scott <leigh123linux(a)googlemail.com> - 2.8.7-7
+- Add build fix for ffmpeg-3.5 git
+
* Thu Jan 18 2018 Antonio Trande <sagitterATfedoraproject.org> - 2.8.7-6
- Add tirpc BR package