[ptlib] Add patch to fix crash in webcam - RHBZ 907303

Peter Robinson pbrobinson at fedoraproject.org
Fri Mar 8 00:11:59 UTC 2013


commit 5495d5fb7b8901b7e427b9e826981db870ad32d5
Author: Peter Robinson <pbrobinson at gmail.com>
Date:   Fri Mar 8 00:11:48 2013 +0000

    Add patch to fix crash in webcam - RHBZ 907303

 ptlib-fixcamcrash.patch |   30 ++++++++++++++++++++++++++++++
 ptlib.spec              |    7 ++++++-
 2 files changed, 36 insertions(+), 1 deletions(-)
---
diff --git a/ptlib-fixcamcrash.patch b/ptlib-fixcamcrash.patch
new file mode 100644
index 0000000..10c6dd7
--- /dev/null
+++ b/ptlib-fixcamcrash.patch
@@ -0,0 +1,30 @@
+--- ptlib-2.10.10/plugins/vidinput_v4l2/vidinput_v4l2.cxx.orig	2013-02-20 02:12:05.000000000 +0000
++++ ptlib-2.10.10/plugins/vidinput_v4l2/vidinput_v4l2.cxx	2013-03-08 00:07:18.812865388 +0000
+@@ -30,9 +30,9 @@
+  * Contributor(s): Guilhem Tardy (gtardy at salyens.com)
+  *  Nicola Orru' <nigu at itadinanta.it>
+  *
+- * $Revision: 27739 $
+- * $Author: rjongbloed $
+- * $Date: 2012-05-30 18:49:09 -0500 (Wed, 30 May 2012) $
++ * $Revision: 29220 $
++ * $Author: ededu $
++ * $Date: 2013-03-07 18:22:08 +0000 (Thu, 07 Mar 2013) $
+  */
+ 
+ #pragma implementation "vidinput_v4l2.h"
+@@ -219,9 +219,11 @@
+     canSetFrameRate = videoStreamParm.parm.capture.capability & V4L2_CAP_TIMEPERFRAME;
+     if (canSetFrameRate) {
+       if (videoStreamParm.parm.capture.timeperframe.numerator == 0) {
+-        PTRACE(1,"PVidInDev\tnumerator is zero and denominator is " << videoStreamParm.parm.capture.timeperframe.denominator << ", driver bug??");
+-      }
+-      PVideoDevice::SetFrameRate (videoStreamParm.parm.capture.timeperframe.denominator / videoStreamParm.parm.capture.timeperframe.numerator);
++        PTRACE(1,"PVidInDev\tDriver/webcam bug: numerator is zero and denominator is " << videoStreamParm.parm.capture.timeperframe.denominator << ", I assume it cannot set frame rate");
++        canSetFrameRate = PFalse;
++      } else
++        PVideoDevice::SetFrameRate (videoStreamParm.parm.capture.timeperframe.denominator / videoStreamParm.parm.capture.timeperframe.numerator);
++
+     }
+   }
+ 
diff --git a/ptlib.spec b/ptlib.spec
index 166a58c..a7454e1 100644
--- a/ptlib.spec
+++ b/ptlib.spec
@@ -1,12 +1,13 @@
 Name:		ptlib
 Summary:	Portable Tools Library
 Version:	2.10.10
-Release:	1%{?dist}
+Release:	2%{?dist}
 URL:		http://www.opalvoip.org/
 License:	MPLv1.0
 Group:		System Environment/Libraries
 
 Source0:	ftp://ftp.gnome.org/pub/gnome/sources/%{name}/2.10/%{name}-%{version}.tar.xz
+Patch0:		ptlib-fixcamcrash.patch
 
 BuildRequires:	pkgconfig, expat-devel, flex, bison
 BuildRequires:  alsa-lib-devel, libv4l-devel
@@ -34,6 +35,7 @@ The ptlib-devel package includes the libraries and header files for ptlib.
 
 %prep
 %setup -q 
+%patch0 -p1 -b .fixcam
 
 %build
 export CFLAGS="%{optflags} -DLDAP_DEPRECATED"
@@ -76,6 +78,9 @@ find %{buildroot} -name '*.a' -exec rm -f {} ';'
 %attr(755,root,root) %{_bindir}/*
 
 %changelog
+* Thu Mar  7 2013 Peter Robinson <pbrobinson at fedoraproject.org> 2.10.10-2
+- Add patch to fix crash in webcam - RHBZ 907303
+
 * Wed Feb 20 2013 Peter Robinson <pbrobinson at fedoraproject.org> 2.10.10-1
 - New 2.10.10 stable release
 


More information about the scm-commits mailing list