Fix vaapipostproc crash in live pipelines

This commit is contained in:
Simon Farnsworth 2014-02-07 14:57:35 +00:00
parent 3fa00f1487
commit 8da5811cdc
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 4998c53c8775f79b7e19a93ed47a0e7e65f6be03 Mon Sep 17 00:00:00 2001
From: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Date: Fri, 7 Feb 2014 12:27:50 +0000
Subject: [PATCH] vaapipostproc: Create filter surface pool if it does not
exist
ensure_srcpad_buffer_pool tries to avoid unnecessarily deleting and
recreating filter_pool. Unfortunately, this also meant it didn't create it
if it did not exist.
Fix it to always create the buffer pool if it does not exist.
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
---
gst/vaapi/gstvaapipostproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
index f1be89c..70cc411 100644
--- a/gst/vaapi/gstvaapipostproc.c
+++ b/gst/vaapi/gstvaapipostproc.c
@@ -1126,7 +1126,7 @@ ensure_srcpad_buffer_pool(GstVaapiPostproc *postproc, GstCaps *caps)
gst_video_info_set_format(&vi, postproc->format,
GST_VIDEO_INFO_WIDTH(&vi), GST_VIDEO_INFO_HEIGHT(&vi));
- if (!video_info_changed(&vi, &postproc->filter_pool_info))
+ if (postproc->filter_pool && !video_info_changed(&vi, &postproc->filter_pool_info))
return TRUE;
postproc->filter_pool_info = vi;
--
1.8.5.3

View File

@ -1,11 +1,13 @@
Name: gstreamer1-vaapi
Version: 0.5.8
Release: 1%{?dist}
Release: 2%{?dist}
Summary: GStreamer plugins to use VA API video acceleration
License: LGPLv2+
URL: https://gitorious.org/vaapi/gstreamer-vaapi/
Source0: http://www.freedesktop.org/software/vaapi/releases/gstreamer-vaapi/gstreamer-vaapi-%{version}.tar.bz2
# Fix for https://bugzilla.gnome.org/show_bug.cgi?id=723834
Patch1: 0001-vaapipostproc-Create-filter-surface-pool-if-it-does-.patch
BuildRequires: glib2-devel >= 2.28
BuildRequires: gstreamer1-devel >= 1.0.0
@ -35,6 +37,7 @@ developing applications that use %{name}.
%prep
%setup -q -n gstreamer-vaapi-%{version}
%patch0 -p1
%build
@ -73,5 +76,8 @@ find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
%{_libdir}/pkgconfig/gstreamer-vaapi*.pc
%changelog
* Fri Feb 7 2014 Simon Farnsworth <simon@farnz.org.uk> - 0.5.8-2
- Fix vaapipostproc crash in live pipelines
* Wed Feb 5 2014 Simon Farnsworth <simon@farnz.org.uk> - 0.5.8-1
- initial release