[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [SCM] Gnash branch, master, updated. b902917c56b485381e6d
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] [SCM] Gnash branch, master, updated. b902917c56b485381e6de496a125502d0840cd87 |
Date: |
Fri, 26 Nov 2010 08:33:01 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".
The branch, master has been updated
via b902917c56b485381e6de496a125502d0840cd87 (commit)
from 0697edbd064d10c206a580b34c30d92869982d92 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=b902917c56b485381e6de496a125502d0840cd87
commit b902917c56b485381e6de496a125502d0840cd87
Author: Sandro Santilli <address@hidden>
Date: Fri Nov 26 09:32:54 2010 +0100
Check return values from gst_element_factory_make and GST_PROPERTY_PROBE
(hopefully fixes https://savannah.gnu.org/bugs/?31771)
diff --git a/libmedia/gst/AudioInputGst.cpp b/libmedia/gst/AudioInputGst.cpp
index afbb460..8ab7479 100644
--- a/libmedia/gst/AudioInputGst.cpp
+++ b/libmedia/gst/AudioInputGst.cpp
@@ -96,7 +96,7 @@ AudioInputGst::findAudioDevs()
if (element == NULL) {
log_error("%s: Could not create audio test source", __FUNCTION__);
- _audioVect.push_back(NULL);
+ _audioVect.push_back(NULL); // ??? what for ? FIXME
} else {
_audioVect.push_back(new GnashAudio);
_audioVect.back()->setElementPtr(element);
@@ -111,7 +111,16 @@ AudioInputGst::findAudioDevs()
element = NULL;
element = gst_element_factory_make ("pulsesrc", "pulsesrc");
+ if ( ! element ) {
+ log_error("%s: Could not create pulsesrc element", __FUNCTION__);
+ return;
+ }
probe = GST_PROPERTY_PROBE (element);
+ if ( ! probe ) {
+ log_error("%s: Could not get property probe from pulsesrc element",
+ __FUNCTION__);
+ return;
+ }
devarr = gst_property_probe_probe_and_get_values_name (probe, "device");
for (size_t i = 0; devarr != NULL && i < devarr->n_values; ++i) {
GValue *val;
diff --git a/libmedia/gst/VideoInputGst.cpp b/libmedia/gst/VideoInputGst.cpp
index 03556e6..3a861fa 100644
--- a/libmedia/gst/VideoInputGst.cpp
+++ b/libmedia/gst/VideoInputGst.cpp
@@ -365,7 +365,7 @@ VideoInputGst::findVidDevs(std::vector<GnashWebcam*>&
cameraList)
if (element == NULL) {
log_error("%s: Could not create video test source.", __FUNCTION__);
- cameraList.push_back(NULL);
+ cameraList.push_back(NULL); // ??? what for ? FIXME
} else {
cameraList.push_back(new GnashWebcam);
GnashWebcam& cam = *cameraList.back();
@@ -381,7 +381,16 @@ VideoInputGst::findVidDevs(std::vector<GnashWebcam*>&
cameraList)
element = NULL;
element = gst_element_factory_make ("v4lsrc", "v4lvidsrc");
+ if ( ! element ) {
+ log_error("%s: Could not create pulsesrc element", __FUNCTION__);
+ return;
+ }
probe = GST_PROPERTY_PROBE (element);
+ if ( ! probe ) {
+ log_error("%s: Could not get property probe from pulsesrc element",
+ __FUNCTION__);
+ return;
+ }
devarr = gst_property_probe_probe_and_get_values_name (probe, "device");
for (size_t i = 0; devarr != NULL && i < devarr->n_values; ++i) {
GValue *val;
-----------------------------------------------------------------------
Summary of changes:
libmedia/gst/AudioInputGst.cpp | 11 ++++++++++-
libmedia/gst/VideoInputGst.cpp | 11 ++++++++++-
2 files changed, 20 insertions(+), 2 deletions(-)
hooks/post-receive
--
Gnash
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] [SCM] Gnash branch, master, updated. b902917c56b485381e6de496a125502d0840cd87,
Sandro Santilli <=