mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 02:15:31 +00:00
rtspconnection: No remove child if destroyed.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740730
This commit is contained in:
parent
3c17b86639
commit
e3a212e0d4
1 changed files with 4 additions and 2 deletions
|
@ -3142,6 +3142,7 @@ gst_rtsp_source_dispatch_read (GPollableInputStream * stream,
|
||||||
else if (G_UNLIKELY (res == GST_RTSP_EEOF)) {
|
else if (G_UNLIKELY (res == GST_RTSP_EEOF)) {
|
||||||
g_mutex_lock (&watch->mutex);
|
g_mutex_lock (&watch->mutex);
|
||||||
if (watch->readsrc) {
|
if (watch->readsrc) {
|
||||||
|
if (!g_source_is_destroyed ((GSource *) watch))
|
||||||
g_source_remove_child_source ((GSource *) watch, watch->readsrc);
|
g_source_remove_child_source ((GSource *) watch, watch->readsrc);
|
||||||
g_source_unref (watch->readsrc);
|
g_source_unref (watch->readsrc);
|
||||||
watch->readsrc = NULL;
|
watch->readsrc = NULL;
|
||||||
|
@ -3305,6 +3306,7 @@ gst_rtsp_source_dispatch_write (GPollableOutputStream * stream,
|
||||||
rec = g_queue_pop_tail (watch->messages);
|
rec = g_queue_pop_tail (watch->messages);
|
||||||
if (rec == NULL) {
|
if (rec == NULL) {
|
||||||
if (watch->writesrc) {
|
if (watch->writesrc) {
|
||||||
|
if (!g_source_is_destroyed ((GSource *) watch))
|
||||||
g_source_remove_child_source ((GSource *) watch, watch->writesrc);
|
g_source_remove_child_source ((GSource *) watch, watch->writesrc);
|
||||||
g_source_unref (watch->writesrc);
|
g_source_unref (watch->writesrc);
|
||||||
watch->writesrc = NULL;
|
watch->writesrc = NULL;
|
||||||
|
|
Loading…
Reference in a new issue