[farsight2/master] rtp: Don't unref passed caps in discovery

Olivier Crête olivier.crete at collabora.co.uk
Tue May 19 10:58:06 PDT 2009


Don't try to unref the caps pass as input, instead ref them when they are
added somewhere.
---
 gst/fsrtpconference/fs-rtp-discover-codecs.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/gst/fsrtpconference/fs-rtp-discover-codecs.c b/gst/fsrtpconference/fs-rtp-discover-codecs.c
index 421f92c..5444ac9 100644
--- a/gst/fsrtpconference/fs-rtp-discover-codecs.c
+++ b/gst/fsrtpconference/fs-rtp-discover-codecs.c
@@ -1204,12 +1204,11 @@ create_codec_cap_list (GstElementFactory *factory,
             gst_caps_unref (entry->rtp_caps);
             entry->rtp_caps = new_rtp_caps;
           } else {
-            entry->rtp_caps = rtp_caps;
+            entry->rtp_caps = gst_caps_ref (rtp_caps);
             /* This shouldn't happen, its we're looking at rtp elements
              * or we're not */
             g_assert_not_reached ();
           }
-          gst_caps_unref (rtp_caps);
         }
 
         newcaps = gst_caps_union (cur_caps, entry->caps);
-- 
1.5.6.5




More information about the farsight-commits mailing list