mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
rtspsrc: fix seek event leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3500>
This commit is contained in:
parent
4cbdf43e7d
commit
38f6a0ba2e
1 changed files with 5 additions and 2 deletions
|
@ -1594,6 +1594,9 @@ gst_rtspsrc_finalize (GObject * object)
|
||||||
if (rtspsrc->tls_interaction)
|
if (rtspsrc->tls_interaction)
|
||||||
g_object_unref (rtspsrc->tls_interaction);
|
g_object_unref (rtspsrc->tls_interaction);
|
||||||
|
|
||||||
|
if (rtspsrc->initial_seek)
|
||||||
|
gst_event_unref (rtspsrc->initial_seek);
|
||||||
|
|
||||||
/* free locks */
|
/* free locks */
|
||||||
g_rec_mutex_clear (&rtspsrc->stream_rec_lock);
|
g_rec_mutex_clear (&rtspsrc->stream_rec_lock);
|
||||||
g_rec_mutex_clear (&rtspsrc->state_rec_lock);
|
g_rec_mutex_clear (&rtspsrc->state_rec_lock);
|
||||||
|
@ -9576,12 +9579,12 @@ gst_rtspsrc_send_event (GstElement * element, GstEvent * event)
|
||||||
if (GST_EVENT_TYPE (event) == GST_EVENT_SEEK) {
|
if (GST_EVENT_TYPE (event) == GST_EVENT_SEEK) {
|
||||||
if (rtspsrc->state >= GST_RTSP_STATE_READY) {
|
if (rtspsrc->state >= GST_RTSP_STATE_READY) {
|
||||||
res = gst_rtspsrc_perform_seek (rtspsrc, event);
|
res = gst_rtspsrc_perform_seek (rtspsrc, event);
|
||||||
gst_event_unref (event);
|
|
||||||
} else {
|
} else {
|
||||||
/* Store for later use */
|
/* Store for later use */
|
||||||
res = TRUE;
|
res = TRUE;
|
||||||
rtspsrc->initial_seek = event;
|
gst_event_replace (&rtspsrc->initial_seek, event);
|
||||||
}
|
}
|
||||||
|
gst_event_unref (event);
|
||||||
} else if (GST_EVENT_IS_DOWNSTREAM (event)) {
|
} else if (GST_EVENT_IS_DOWNSTREAM (event)) {
|
||||||
res = gst_rtspsrc_push_event (rtspsrc, event);
|
res = gst_rtspsrc_push_event (rtspsrc, event);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue