diff options
author | Olivier Crete <tester@tester.ca> | 2008-04-21 08:26:37 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2008-04-21 08:26:37 +0000 |
commit | 4be1b4a30a383231448c727c6413495cfdbcb5b6 (patch) | |
tree | 6cc81f8bae5e41dc09008c05a6955b98dd5403da /gst/rtpmanager/gstrtpptdemux.c | |
parent | a6a13dff0fdb282fa445f88654f20f0c5e9305f6 (diff) | |
download | gst-plugins-bad-4be1b4a30a383231448c727c6413495cfdbcb5b6.tar.gz gst-plugins-bad-4be1b4a30a383231448c727c6413495cfdbcb5b6.tar.bz2 gst-plugins-bad-4be1b4a30a383231448c727c6413495cfdbcb5b6.zip |
gst/rtpmanager/gstrtpbin.c: Ref caps when inserting into the cache.
Original commit message from CVS:
Patch by: Olivier Crete <tester at tester dot ca>
* gst/rtpmanager/gstrtpbin.c: (create_session), (get_pt_map),
(new_ssrc_pad_found):
Ref caps when inserting into the cache.
Don't leak pads.
* gst/rtpmanager/gstrtpjitterbuffer.c:
(gst_rtp_jitter_buffer_get_clock_rate),
(gst_rtp_jitter_buffer_query):
Avoid a caps leak.
Don't leak refcount in query.
* gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_get_caps),
(gst_rtp_pt_demux_chain):
Avoid caps leaks.
* gst/rtpmanager/gstrtpsession.c: (source_get_sdes_structure),
(gst_rtp_session_init), (return_true),
(gst_rtp_session_clear_pt_map), (gst_rtp_session_cache_caps),
(gst_rtp_session_clock_rate):
Ref caps when inserting into the cache.
Fix some more caps leaks. Fixes #528245.
Diffstat (limited to 'gst/rtpmanager/gstrtpptdemux.c')
-rw-r--r-- | gst/rtpmanager/gstrtpptdemux.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/rtpmanager/gstrtpptdemux.c b/gst/rtpmanager/gstrtpptdemux.c index f3121cb4..b6df8526 100644 --- a/gst/rtpmanager/gstrtpptdemux.c +++ b/gst/rtpmanager/gstrtpptdemux.c @@ -277,8 +277,11 @@ gst_rtp_pt_demux_get_caps (GstRtpPtDemux * rtpdemux, guint pt) g_value_unset (&args[1]); caps = g_value_dup_boxed (&ret); g_value_unset (&ret); - if (caps == NULL) + if (caps == NULL) { caps = GST_PAD_CAPS (rtpdemux->sink); + if (caps) + gst_caps_ref (caps); + } GST_DEBUG ("pt %d, got caps %" GST_PTR_FORMAT, pt, caps); @@ -341,6 +344,7 @@ gst_rtp_pt_demux_chain (GstPad * pad, GstBuffer * buf) caps = gst_caps_make_writable (caps); gst_caps_set_simple (caps, "payload", G_TYPE_INT, pt, NULL); gst_pad_set_caps (srcpad, caps); + gst_caps_unref (caps); GST_DEBUG ("Adding pt=%d to the list.", pt); rtpdemuxpad = g_new0 (GstRtpPtDemuxPad, 1); @@ -380,6 +384,7 @@ gst_rtp_pt_demux_chain (GstPad * pad, GstBuffer * buf) caps = gst_caps_make_writable (caps); gst_caps_set_simple (caps, "payload", G_TYPE_INT, pt, NULL); gst_pad_set_caps (srcpad, caps); + gst_caps_unref (caps); rtpdemuxpad->newcaps = FALSE; } |