mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
rtpsession: mt-safe event-push
By taking a ref of the sink-pad under lock, it won't dissappear while the push is taking place https://bugzilla.gnome.org/show_bug.cgi?id=667816
This commit is contained in:
parent
f459fe2673
commit
268c998a32
1 changed files with 12 additions and 4 deletions
|
@ -2212,10 +2212,18 @@ gst_rtp_session_request_key_unit (RTPSession * sess,
|
||||||
GstRtpSession *rtpsession = GST_RTP_SESSION (user_data);
|
GstRtpSession *rtpsession = GST_RTP_SESSION (user_data);
|
||||||
GstEvent *event;
|
GstEvent *event;
|
||||||
|
|
||||||
event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
|
GST_RTP_SESSION_LOCK (rtpsession);
|
||||||
gst_structure_new ("GstForceKeyUnit",
|
if (rtpsession->send_rtp_sink)
|
||||||
"all-headers", G_TYPE_BOOLEAN, all_headers, NULL));
|
send_rtp_sink = gst_object_ref (rtpsession->send_rtp_sink);
|
||||||
gst_pad_push_event (rtpsession->send_rtp_sink, event);
|
GST_RTP_SESSION_UNLOCK (rtpsession);
|
||||||
|
|
||||||
|
if (send_rtp_sink) {
|
||||||
|
GstEvent *event = gst_event_new_custom (GST_EVENT_CUSTOM_UPSTREAM,
|
||||||
|
gst_structure_new ("GstForceKeyUnit",
|
||||||
|
"all-headers", G_TYPE_BOOLEAN, all_headers, NULL));
|
||||||
|
gst_pad_push_event (send_rtp_sink, event);
|
||||||
|
gst_object_unref (send_rtp_sink);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstClockTime
|
static GstClockTime
|
||||||
|
|
Loading…
Reference in a new issue