summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-08-30 21:57:57 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-08-31 08:09:09 +0200
commit041fa82179f004e8c71747f50196aa9d0ce9e66e (patch)
tree372fc69e899b3da08aafe98aca368c0c618b42c7 /gst/rtpmanager
parent000a483d31bf307370ef3dd990c991ed34dd0ef9 (diff)
rtpsession: Make sure that used caps are not freed already
Fixes bug #593391.
Diffstat (limited to 'gst/rtpmanager')
-rw-r--r--gst/rtpmanager/gstrtpsession.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c
index 55903da1..14bc993e 100644
--- a/gst/rtpmanager/gstrtpsession.c
+++ b/gst/rtpmanager/gstrtpsession.c
@@ -1011,12 +1011,15 @@ gst_rtp_session_send_rtcp (RTPSession * sess, RTPSource * src,
GstCaps *caps;
/* set rtcp caps on output pad */
- if (!(caps = GST_PAD_CAPS (rtpsession->send_rtcp_src))) {
+ caps = GST_PAD_CAPS (rtpsession->send_rtcp_src);
+ if (!caps) {
caps = gst_caps_new_simple ("application/x-rtcp", NULL);
gst_pad_set_caps (rtpsession->send_rtcp_src, caps);
- gst_caps_unref (caps);
+ } else {
+ gst_caps_ref (caps);
}
gst_buffer_set_caps (buffer, caps);
+ gst_caps_unref (caps);
GST_LOG_OBJECT (rtpsession, "sending RTCP");
result = gst_pad_push (rtpsession->send_rtcp_src, buffer);