summaryrefslogtreecommitdiffstats
path: root/gst/real/gstrealaudiodec.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-07-19 15:37:50 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-07-19 15:42:10 +0100
commit114425d7eebfe4729ded504765d1a4c027db5734 (patch)
treecc7b15097ae77c38fde709b28b7d4e844dcc084a /gst/real/gstrealaudiodec.c
parent01200712ead2c6d94ab29c9af2f283f34844e4d7 (diff)
downloadgst-plugins-bad-114425d7eebfe4729ded504765d1a4c027db5734.tar.gz
gst-plugins-bad-114425d7eebfe4729ded504765d1a4c027db5734.tar.bz2
gst-plugins-bad-114425d7eebfe4729ded504765d1a4c027db5734.zip
real: differentiate between 'module does not exist' and genuine module opening errors
Don't log a GST_ERROR if one of the codec modules we were looking for doesn't exist. That's not a genuine error, but somewhat expected.
Diffstat (limited to 'gst/real/gstrealaudiodec.c')
-rw-r--r--gst/real/gstrealaudiodec.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gst/real/gstrealaudiodec.c b/gst/real/gstrealaudiodec.c
index 1a94a77b..5f5b900d 100644
--- a/gst/real/gstrealaudiodec.c
+++ b/gst/real/gstrealaudiodec.c
@@ -262,12 +262,20 @@ open_library (GstRealAudioDec * dec, gint version, GstRADecLibrary * lib)
GST_LOG_OBJECT (dec, "opening module %s", codec);
- lib->module = g_module_open (codec, G_MODULE_BIND_LAZY);
+ /* This is racy, but it doesn't matter here; would be nice if GModule
+ * gave us a GError instead of an error string, but it doesn't, so.. */
+ if (g_file_test (codec, G_FILE_TEST_EXISTS)) {
+ lib->module = g_module_open (codec, G_MODULE_BIND_LAZY);
+ if (lib->module == NULL) {
+ GST_ERROR_OBJECT (dec, "Could not open codec library '%s': %s",
+ codec, g_module_error ());
+ }
+ } else {
+ GST_DEBUG_OBJECT (dec, "%s does not exist", codec);
+ }
g_free (codec);
if (lib->module)
goto codec_search_done;
-
- GST_LOG_OBJECT (dec, "failure, try next one...");
}
}