[farsight2/master] rtp cache: Reject cache if the factory does not exist

Olivier Crête olivier.crete at collabora.co.uk
Mon Jun 29 14:22:48 PDT 2009


---
 gst/fsrtpconference/fs-rtp-codec-cache.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-codec-cache.c b/gst/fsrtpconference/fs-rtp-codec-cache.c
index 558974a..9cec6d2 100644
--- a/gst/fsrtpconference/fs-rtp-codec-cache.c
+++ b/gst/fsrtpconference/fs-rtp-codec-cache.c
@@ -209,6 +209,8 @@ load_codec_blueprint (FsMediaType media_type, gchar **in, gsize *size) {
       READ_CHECK (read_codec_blueprint_string (in, size, &(tmp)));
       fact = gst_element_factory_find (tmp);
       g_free (tmp);
+      if (!fact)
+        goto error;
       tmplist = g_list_append (tmplist, fact);
     }
     codec_blueprint->send_pipeline_factory =
@@ -226,6 +228,8 @@ load_codec_blueprint (FsMediaType media_type, gchar **in, gsize *size) {
       READ_CHECK (read_codec_blueprint_string (in, size, &(tmp)));
       fact = gst_element_factory_find (tmp);
       g_free (tmp);
+      if (!fact)
+        goto error;
       tmplist = g_list_append (tmplist, fact);
     }
     codec_blueprint->receive_pipeline_factory =
-- 
1.5.6.5



More information about the farsight-commits mailing list