mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
rtpbasepayload: Handle gst_pad_get_current_caps() returning NULL gracefully
This commit is contained in:
parent
27a1fa469c
commit
2c29f09da8
1 changed files with 7 additions and 5 deletions
|
@ -544,11 +544,13 @@ gst_rtp_base_payload_src_event_default (GstRTPBasePayload * rtpbasepayload,
|
|||
rtpbasepayload->current_ssrc = g_random_int ();
|
||||
|
||||
caps = gst_pad_get_current_caps (rtpbasepayload->srcpad);
|
||||
caps = gst_caps_make_writable (caps);
|
||||
gst_caps_set_simple (caps,
|
||||
"ssrc", G_TYPE_UINT, rtpbasepayload->current_ssrc, NULL);
|
||||
res = gst_pad_set_caps (rtpbasepayload->srcpad, caps);
|
||||
gst_caps_unref (caps);
|
||||
if (caps) {
|
||||
caps = gst_caps_make_writable (caps);
|
||||
gst_caps_set_simple (caps,
|
||||
"ssrc", G_TYPE_UINT, rtpbasepayload->current_ssrc, NULL);
|
||||
res = gst_pad_set_caps (rtpbasepayload->srcpad, caps);
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
|
||||
/* the event was for us */
|
||||
forward = FALSE;
|
||||
|
|
Loading…
Reference in a new issue