commit 419d0a80217426c99ec26d8c4949b71f5adedf55
Author: leigh123linux <leigh123linux(a)googlemail.com>
Date: Sun Nov 19 10:02:25 2017 +0000
Temporary patch for FFMpeg 3.4 APIs.
gstreamer1-libav-temp-ffmpeg-3.4-api.patch | 25 +++++++++++++++++++++++++
gstreamer1-libav.spec | 10 ++++++++--
2 files changed, 33 insertions(+), 2 deletions(-)
---
diff --git a/gstreamer1-libav-temp-ffmpeg-3.4-api.patch
b/gstreamer1-libav-temp-ffmpeg-3.4-api.patch
new file mode 100644
index 0000000..9558713
--- /dev/null
+++ b/gstreamer1-libav-temp-ffmpeg-3.4-api.patch
@@ -0,0 +1,25 @@
+--- gst-libav-1.12.3.orig/ext/libav/gstavviddec.c 2017-08-10 17:56:34.000000000 +0200
++++ gst-libav-1.12.3.orig/ext/libav/gstavviddec.c 2017-11-04 21:48:00.784354386 +0100
+@@ -1525,8 +1525,20 @@
+ * See
https://bugzilla.gnome.org/show_bug.cgi?id=726020
+ */
+ GST_VIDEO_DECODER_STREAM_UNLOCK (ffmpegdec);
+- len = avcodec_decode_video2 (ffmpegdec->context,
+- ffmpegdec->picture, have_data, &packet);
++ *have_data = 0;
++ if (size > 0) {
++ len = avcodec_send_packet(ffmpegdec->context, &packet);
++ if (len == AVERROR(EAGAIN)) {
++ len = 0;
++ } else {
++ len = size;
++ }
++ if (len >= 0) {
++ int result = avcodec_receive_frame(ffmpegdec->context, ffmpegdec->picture);
++ if (result == 0)
++ *have_data = 1;
++ }
++ }
+ GST_VIDEO_DECODER_STREAM_LOCK (ffmpegdec);
+
+ GST_DEBUG_OBJECT (ffmpegdec, "after decode: len %d, have_data %d",
diff --git a/gstreamer1-libav.spec b/gstreamer1-libav.spec
index 49efb9e..fe27d80 100644
--- a/gstreamer1-libav.spec
+++ b/gstreamer1-libav.spec
@@ -1,12 +1,15 @@
Name: gstreamer1-libav
Version: 1.12.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: GStreamer 1.0 libav-based plug-ins
Group: Applications/Multimedia
License: LGPLv2+
URL:
http://gstreamer.freedesktop.org/
Source0:
http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-%{version}.tar.xz
Patch0: gst-ffmpeg-0.10.12-ChangeLog-UTF-8.patch
+%if 0%{?fedora} > 27 || 0%{?rhel} > 8
+Patch1: %{name}-temp-ffmpeg-3.4-api.patch
+%endif
BuildRequires: gstreamer1-devel >= %{version}
BuildRequires: gstreamer1-plugins-base-devel >= %{version}
BuildRequires: orc-devel
@@ -43,7 +46,7 @@ plug-in.
%prep
-%autosetup -n gst-libav-%{version}
+%autosetup -p1 -n gst-libav-%{version}
%build
@@ -72,6 +75,9 @@ rm %{buildroot}%{_libdir}/gstreamer-1.0/libgst*.la
%changelog
+* Sat Nov 18 2017 Simone Caronni <negativo17(a)gmail.com> - 1.12.3-3
+- Temporary patch for FFMpeg 3.4 APIs.
+
* Mon Oct 16 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 1.12.3-2
- Rebuild for ffmpeg update