[farsight2/master] Don't add NULL codec to current-recv-codecs list

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:23:42 PST 2008


---
 gst/fsrtpconference/fs-rtp-stream.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-stream.c b/gst/fsrtpconference/fs-rtp-stream.c
index 577e348..1244e0a 100644
--- a/gst/fsrtpconference/fs-rtp-stream.c
+++ b/gst/fsrtpconference/fs-rtp-stream.c
@@ -341,10 +341,14 @@ fs_rtp_stream_get_property (GObject *object,
         {
           FsCodec *codec = NULL;
           g_object_get (substream_item->data, "codec", &codec, NULL);
-          if (!_codec_list_has_codec (codeclist, codec))
-            codeclist = g_list_append (codeclist, codec);
-          else
-            fs_codec_destroy (codec);
+
+          if (codec)
+          {
+            if (!_codec_list_has_codec (codeclist, codec))
+              codeclist = g_list_append (codeclist, codec);
+            else
+              fs_codec_destroy (codec);
+          }
         }
 
         g_value_take_boxed (value, codeclist);
-- 
1.5.6.5




More information about the farsight-commits mailing list