ekiga r7785 - trunk/lib/engine/components/gstreamer
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7785 - trunk/lib/engine/components/gstreamer
- Date: Tue, 17 Mar 2009 20:31:21 +0000 (UTC)
Author: jpuydt
Date: Tue Mar 17 20:31:21 2009
New Revision: 7785
URL: http://svn.gnome.org/viewvc/ekiga?rev=7785&view=rev
Log:
Fixed the device detections in the gstreamer code : it could crash
Modified:
trunk/lib/engine/components/gstreamer/gst-audioinput.cpp
trunk/lib/engine/components/gstreamer/gst-audiooutput.cpp
trunk/lib/engine/components/gstreamer/gst-videoinput.cpp
Modified: trunk/lib/engine/components/gstreamer/gst-audioinput.cpp
==============================================================================
--- trunk/lib/engine/components/gstreamer/gst-audioinput.cpp (original)
+++ trunk/lib/engine/components/gstreamer/gst-audioinput.cpp Tue Mar 17 20:31:21 2009
@@ -304,8 +304,11 @@
descr = g_strdup_printf ("alsasrc device=%s ! volume name=ekiga_volume",
g_value_get_string (device));
- devices_by_name[std::pair<std::string,std::string>("ALSA", name)] = descr;
- g_free (name);
+ if (name != 0) {
+
+ devices_by_name[std::pair<std::string,std::string>("ALSA", name)] = descr;
+ g_free (name);
+ }
g_free (descr);
}
g_value_array_free (array);
@@ -350,8 +353,11 @@
descr = g_strdup_printf ("pulsesrc device=%s ! volume name=ekiga_volume",
g_value_get_string (device));
- devices_by_name[std::pair<std::string,std::string>("PULSEAUDIO", name)] = descr;
- g_free (name);
+ if (name != 0) {
+
+ devices_by_name[std::pair<std::string,std::string>("PULSEAUDIO", name)] = descr;
+ g_free (name);
+ }
g_free (descr);
}
g_value_array_free (array);
Modified: trunk/lib/engine/components/gstreamer/gst-audiooutput.cpp
==============================================================================
--- trunk/lib/engine/components/gstreamer/gst-audiooutput.cpp (original)
+++ trunk/lib/engine/components/gstreamer/gst-audiooutput.cpp Tue Mar 17 20:31:21 2009
@@ -354,8 +354,11 @@
descr = g_strdup_printf ("volume name=ekiga_volume ! alsasink device=%s",
g_value_get_string (device));
- devices_by_name[std::pair<std::string,std::string>("ALSA", name)] = descr;
- g_free (name);
+ if (name != 0) {
+
+ devices_by_name[std::pair<std::string,std::string>("ALSA", name)] = descr;
+ g_free (name);
+ }
g_free (descr);
}
g_value_array_free (array);
@@ -400,8 +403,12 @@
descr = g_strdup_printf ("volume name=ekiga_volume ! pulsesink device=%s",
g_value_get_string (device));
- devices_by_name[std::pair<std::string,std::string>("PULSEAUDIO", name)] = descr;
- g_free (name);
+ if (name != 0) {
+
+ devices_by_name[std::pair<std::string,std::string>("PULSEAUDIO", name)] = descr;
+
+ g_free (name);
+ }
g_free (descr);
}
g_value_array_free (array);
Modified: trunk/lib/engine/components/gstreamer/gst-videoinput.cpp
==============================================================================
--- trunk/lib/engine/components/gstreamer/gst-videoinput.cpp (original)
+++ trunk/lib/engine/components/gstreamer/gst-videoinput.cpp Tue Mar 17 20:31:21 2009
@@ -274,7 +274,11 @@
descr = g_strdup_printf ("v4l2src device=%s"
" ! videoscale ! ffmpegcolorspace",
g_value_get_string (device));
- devices_by_name[std::pair<std::string,std::string>("V4L2",name)] = descr;
+ if (name != 0) {
+
+ devices_by_name[std::pair<std::string,std::string>("V4L2",name)] = descr;
+ g_free (name);
+ }
g_free (descr);
}
@@ -339,7 +343,11 @@
" ! videoscale"
" ! ffmpegcolorspace",
g_value_get_uint64 (guid));
- devices_by_name[std::pair<std::string,std::string>("DV",name)] = descr;
+ if (name != 0) {
+
+ devices_by_name[std::pair<std::string,std::string>("DV",name)] = descr;
+ g_free (name);
+ }
g_free (descr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]