[farsight2/master] Return an error if no codecs where detected, every time

Olivier Crête olivier.crete at collabora.co.uk
Thu Apr 23 16:20:12 PDT 2009


---
 gst/fsrtpconference/fs-rtp-discover-codecs.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-discover-codecs.c b/gst/fsrtpconference/fs-rtp-discover-codecs.c
index 7be1ba8..421f92c 100644
--- a/gst/fsrtpconference/fs-rtp-discover-codecs.c
+++ b/gst/fsrtpconference/fs-rtp-discover-codecs.c
@@ -225,7 +225,13 @@ fs_rtp_blueprints_get (FsMediaType media_type, GError **error)
 
   /* if already computed just return list */
   if (codecs_lists_ref[media_type] > 1)
+  {
+    if (!list_codec_blueprints[media_type])
+      g_set_error (error, FS_ERROR, FS_ERROR_NO_CODECS,
+          "No codecs for media type %s detected",
+          fs_media_type_to_string (media_type));
     return list_codec_blueprints[media_type];
+  }
 
   list_codec_blueprints[media_type] = load_codecs_cache (media_type);
   if (list_codec_blueprints[media_type]) {
-- 
1.5.6.5



More information about the farsight-commits mailing list