Cherry pick 2 patches from upstream fixing cheese crashing (rhbz#820959)
This commit is contained in:
parent
ef2d6c3f66
commit
207e1d83fb
37
0005-geometrictransform-crash-fix1.patch
Normal file
37
0005-geometrictransform-crash-fix1.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 4e7edb2778f85a5475ffe9c782c91d86a7b902ca Mon Sep 17 00:00:00 2001
|
||||
From: Oleksij Rempel (Alexey Fisher) <bug-track@fisher-privat.net>
|
||||
Date: Mon, 12 Mar 2012 14:42:04 +0000
|
||||
Subject: geometrictransform: make sure gt->map not freed twice
|
||||
|
||||
current cheese can create situation where gt->map is freed twice.
|
||||
This patch set map to null to avoid it.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=671910
|
||||
|
||||
diff --git a/gst/geometrictransform/gstgeometrictransform.c b/gst/geometrictransform/gstgeometrictransform.c
|
||||
index 8e78de7..274d483 100644
|
||||
--- a/gst/geometrictransform/gstgeometrictransform.c
|
||||
+++ b/gst/geometrictransform/gstgeometrictransform.c
|
||||
@@ -143,9 +143,10 @@ gst_geometric_transform_generate_map (GstGeometricTransform * gt)
|
||||
}
|
||||
|
||||
end:
|
||||
- if (!ret)
|
||||
+ if (!ret) {
|
||||
g_free (gt->map);
|
||||
- else
|
||||
+ gt->map = NULL;
|
||||
+ } else
|
||||
gt->needs_remap = FALSE;
|
||||
return ret;
|
||||
}
|
||||
@@ -348,6 +349,7 @@ gst_geometric_transform_stop (GstBaseTransform * trans)
|
||||
GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM_CAST (trans);
|
||||
|
||||
g_free (gt->map);
|
||||
+ gt->map = NULL;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
36
0006-geometrictransform-crash-fix2.patch
Normal file
36
0006-geometrictransform-crash-fix2.patch
Normal file
@ -0,0 +1,36 @@
|
||||
From 7dd5b2002abf516ebdf92696c57a9a7692c166e9 Mon Sep 17 00:00:00 2001
|
||||
From: Thiago Santos <thiago.sousa.santos@collabora.com>
|
||||
Date: Tue, 20 Mar 2012 23:07:11 +0000
|
||||
Subject: geometrictransform: Prevent access to the transform map when it is null
|
||||
|
||||
Check if the map doesn't exist when receiving a new caps and create
|
||||
a new one. This prevents that the transform functions try to access
|
||||
the map when it doesn't exist.
|
||||
|
||||
diff --git a/gst/geometrictransform/gstgeometrictransform.c b/gst/geometrictransform/gstgeometrictransform.c
|
||||
index be651a4..a1ec3ab 100644
|
||||
--- a/gst/geometrictransform/gstgeometrictransform.c
|
||||
+++ b/gst/geometrictransform/gstgeometrictransform.c
|
||||
@@ -178,8 +178,8 @@ gst_geometric_transform_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
|
||||
|
||||
/* regenerate the map */
|
||||
GST_OBJECT_LOCK (gt);
|
||||
- if (old_width == 0 || old_height == 0 || gt->width != old_width ||
|
||||
- gt->height != old_height) {
|
||||
+ if (gt->map == NULL || old_width == 0 || old_height == 0
|
||||
+ || gt->width != old_width || gt->height != old_height) {
|
||||
if (klass->prepare_func)
|
||||
if (!klass->prepare_func (gt)) {
|
||||
GST_OBJECT_UNLOCK (gt);
|
||||
@@ -352,6 +352,9 @@ gst_geometric_transform_stop (GstBaseTransform * trans)
|
||||
{
|
||||
GstGeometricTransform *gt = GST_GEOMETRIC_TRANSFORM_CAST (trans);
|
||||
|
||||
+ gt->width = 0;
|
||||
+ gt->height = 0;
|
||||
+
|
||||
g_free (gt->map);
|
||||
gt->map = NULL;
|
||||
|
||||
--
|
||||
cgit v0.9.0.2-2-gbebe
|
@ -14,7 +14,7 @@
|
||||
Summary: GStreamer streaming media framework "bad" plug-ins
|
||||
Name: gstreamer-plugins-bad-free
|
||||
Version: 0.10.23
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
# The freeze and nfs plugins are LGPLv2 (only)
|
||||
License: LGPLv2+ and LGPLv2
|
||||
Group: Applications/Multimedia
|
||||
@ -31,6 +31,9 @@ Patch1: 0001-gstcamerabin-Fix-spelling-error-in-debug-logging.patch
|
||||
Patch2: 0002-camerabin-Add-a-camerabin_create_view_finder_caps-he.patch
|
||||
Patch3: 0003-camerabin-Add-gst_camerabin_get_video_source_propert.patch
|
||||
Patch4: 0004-camerabin-Set-src_filter-and-zoom_src_filter-caps-wh.patch
|
||||
# Cherry picked from upstream git for rhbz#820959
|
||||
Patch5: 0005-geometrictransform-crash-fix1.patch
|
||||
Patch6: 0006-geometrictransform-crash-fix2.patch
|
||||
|
||||
Requires: %{gstreamer} >= %{gst_minver}
|
||||
BuildRequires: %{gstreamer}-devel >= %{gst_minver}
|
||||
@ -60,6 +63,7 @@ BuildRequires: mesa-libGLU-devel
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: orc-devel
|
||||
Buildrequires: wavpack-devel
|
||||
BuildRequires: chrpath
|
||||
|
||||
%if %{with extras}
|
||||
BuildRequires: celt-devel
|
||||
@ -161,6 +165,8 @@ aren't tested well enough, or the code is not of good enough quality.
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
sed -i 's/opencv <= 2.2.0/opencv <= 2.4.0/g' configure
|
||||
|
||||
|
||||
@ -180,6 +186,9 @@ make %{?_smp_mflags}
|
||||
make install DESTDIR="$RPM_BUILD_ROOT"
|
||||
%find_lang gst-plugins-bad-%{majorminor}
|
||||
|
||||
# Some of the plugins somehow get an rpath embedded ??
|
||||
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{majorminor}/*.so
|
||||
|
||||
# Clean out files that should not be part of the rpm.
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/gstreamer-%{majorminor}/*.la
|
||||
rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
@ -356,6 +365,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Jun 18 2012 Hans de Goede <hdegoede@redhat.com> - 0.10.23-7
|
||||
- Cherry pick 2 patches from upstream fixing cheese crashing (rhbz#820959)
|
||||
|
||||
* Fri Jun 08 2012 Hans de Goede <hdegoede@redhat.com> - 0.10.23-6
|
||||
- Speedup camerabin pipeline element creation (rhbz#797188, gnome#677698)
|
||||
- Re-enable building of -extras package accidentally disabled by the spec-file
|
||||
|
Loading…
Reference in New Issue
Block a user