Temporary patch for FFMpeg 3.4 APIs.

el8
leigh123linux 7 years ago
parent ead8c83b09
commit 419d0a8021

@ -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",

@ -1,12 +1,15 @@
Name: gstreamer1-libav Name: gstreamer1-libav
Version: 1.12.3 Version: 1.12.3
Release: 2%{?dist} Release: 3%{?dist}
Summary: GStreamer 1.0 libav-based plug-ins Summary: GStreamer 1.0 libav-based plug-ins
Group: Applications/Multimedia Group: Applications/Multimedia
License: LGPLv2+ License: LGPLv2+
URL: http://gstreamer.freedesktop.org/ URL: http://gstreamer.freedesktop.org/
Source0: http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-%{version}.tar.xz Source0: http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-%{version}.tar.xz
Patch0: gst-ffmpeg-0.10.12-ChangeLog-UTF-8.patch 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-devel >= %{version}
BuildRequires: gstreamer1-plugins-base-devel >= %{version} BuildRequires: gstreamer1-plugins-base-devel >= %{version}
BuildRequires: orc-devel BuildRequires: orc-devel
@ -43,7 +46,7 @@ plug-in.
%prep %prep
%autosetup -n gst-libav-%{version} %autosetup -p1 -n gst-libav-%{version}
%build %build
@ -72,6 +75,9 @@ rm %{buildroot}%{_libdir}/gstreamer-1.0/libgst*.la
%changelog %changelog
* Sat Nov 18 2017 Simone Caronni <negativo17@gmail.com> - 1.12.3-3
- Temporary patch for FFMpeg 3.4 APIs.
* Mon Oct 16 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.12.3-2 * Mon Oct 16 2017 Leigh Scott <leigh123linux@googlemail.com> - 1.12.3-2
- Rebuild for ffmpeg update - Rebuild for ffmpeg update

Loading…
Cancel
Save