[gstreamer1-libav] Add patch to disable ffmpeg hardware acceleration for nvenc and qsv (rfbz#4334)

Leigh Scott leigh123linux at rpmfusion.org
Fri Nov 11 12:50:10 CET 2016


commit 00fbe8e093f501ac175568a0d343285e419c37ca
Author: leigh123linux <leigh123linux at googlemail.com>
Date:   Fri Nov 11 11:50:03 2016 +0000

    Add patch to disable ffmpeg hardware acceleration for nvenc and qsv (rfbz#4334)

 disable_ffmpeg_hw_acceleration.patch | 39 ++++++++++++++++++++++++++++++++++++
 gstreamer1-libav.spec                |  9 +++++++--
 2 files changed, 46 insertions(+), 2 deletions(-)
---
diff --git a/disable_ffmpeg_hw_acceleration.patch b/disable_ffmpeg_hw_acceleration.patch
new file mode 100644
index 0000000..62bbeb9
--- /dev/null
+++ b/disable_ffmpeg_hw_acceleration.patch
@@ -0,0 +1,39 @@
+--- a/ext/libav/gstavviddec.c
++++ b/ext/libav/gstavviddec.c
+@@ -2064,6 +2064,13 @@
+     if (strstr (in_plugin->name, "vaapi")) {
+       GST_DEBUG
+           ("Ignoring VAAPI decoder %s. We can't handle this outside of ffmpeg",
++          in_plugin->name);
++      goto next;
++    }
++
++    if (g_str_has_suffix (in_plugin->name, "_qsv")) {
++      GST_DEBUG
++          ("Ignoring qsv decoder %s. We can't handle this outside of ffmpeg",
+           in_plugin->name);
+       goto next;
+     }
+--- a/ext/libav/gstavvidenc.c
++++ b/ext/libav/gstavvidenc.c
+@@ -974,12 +974,19 @@ gst_ffmpegvidenc_register (GstPlugin * p
+       goto next;
+     }
+ 
+-    if (g_str_has_suffix (in_plugin->name, "_nvenc")) {
++    if (strstr (in_plugin->name, "nvenc")) {
+       GST_DEBUG
+           ("Ignoring nvenc encoder %s. We can't handle this outside of ffmpeg",
+           in_plugin->name);
+       goto next;
+     }
++
++    if (g_str_has_suffix (in_plugin->name, "_qsv")) {
++      GST_DEBUG
++          ("Ignoring qsv encoder %s. We can't handle this outside of ffmpeg",
++          in_plugin->name);
++      goto next;
++    }
+ 
+     /* only video encoders */
+     if (!av_codec_is_encoder (in_plugin)
diff --git a/gstreamer1-libav.spec b/gstreamer1-libav.spec
index 9910738..c5c6166 100644
--- a/gstreamer1-libav.spec
+++ b/gstreamer1-libav.spec
@@ -1,6 +1,6 @@
 Name:           gstreamer1-libav
 Version:        1.8.2
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        GStreamer 1.0 libav-based plug-ins
 Group:          Applications/Multimedia
 License:        LGPLv2+
@@ -8,6 +8,7 @@ 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
 Patch1:         ignore_vaapi.patch
+Patch2:         disable_ffmpeg_hw_acceleration.patch
 BuildRequires:  gstreamer1-devel >= 1.6.0
 BuildRequires:  gstreamer1-plugins-base-devel >= 1.6.0
 BuildRequires:  orc-devel bzip2-devel zlib-devel ffmpeg-devel
@@ -44,6 +45,7 @@ plug-in.
 %setup -q -n gst-libav-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 
 %build
@@ -71,8 +73,11 @@ rm $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgst*.la
 
 
 %changelog
+* Fri Nov 11 2016 Leigh Scott <leigh123linux at googlemail.com> - 1.8.2-4
+- Add patch to disable ffmpeg hardware acceleration for nvenc and qsv (rfbz#4334)
+
 * Fri Nov 11 2016 Leigh Scott <leigh123linux at googlemail.com> - 1.8.2-3
-- Add patch to ignore VAAPI decoders and VAAPI/nvenc encoders
+- Add patch to ignore VAAPI decoders and VAAPI/nvenc encoders (rfbz#4334)
 
 * Sat Jul 30 2016 Julian Sikorski <belegdol at fedoraproject.org> - 1.8.2-2
 - Rebuilt for ffmpeg-3.1.1


More information about the rpmfusion-commits mailing list