mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
media: unref source in finish_unprepare
The source is created in prepare, unref it in finish_unprepare. See https://bugzilla.gnome.org/show_bug.cgi?id=688707
This commit is contained in:
parent
01973c924d
commit
989f004e24
1 changed files with 6 additions and 9 deletions
|
@ -171,10 +171,6 @@ gst_rtsp_media_finalize (GObject * obj)
|
||||||
|
|
||||||
g_list_free_full (media->dynamic, gst_object_unref);
|
g_list_free_full (media->dynamic, gst_object_unref);
|
||||||
|
|
||||||
if (media->source) {
|
|
||||||
g_source_destroy (media->source);
|
|
||||||
g_source_unref (media->source);
|
|
||||||
}
|
|
||||||
if (media->auth)
|
if (media->auth)
|
||||||
g_object_unref (media->auth);
|
g_object_unref (media->auth);
|
||||||
if (media->pool)
|
if (media->pool)
|
||||||
|
@ -1339,6 +1335,12 @@ finish_unprepare (GstRTSPMedia * media)
|
||||||
media->reused = TRUE;
|
media->reused = TRUE;
|
||||||
media->status = GST_RTSP_MEDIA_STATUS_UNPREPARED;
|
media->status = GST_RTSP_MEDIA_STATUS_UNPREPARED;
|
||||||
|
|
||||||
|
if (media->source) {
|
||||||
|
g_source_destroy (media->source);
|
||||||
|
g_source_unref (media->source);
|
||||||
|
media->source = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* when the media is not reusable, this will effectively unref the media and
|
/* when the media is not reusable, this will effectively unref the media and
|
||||||
* recreate it */
|
* recreate it */
|
||||||
g_signal_emit (media, gst_rtsp_media_signals[SIGNAL_UNPREPARED], 0, NULL);
|
g_signal_emit (media, gst_rtsp_media_signals[SIGNAL_UNPREPARED], 0, NULL);
|
||||||
|
@ -1395,11 +1397,6 @@ gst_rtsp_media_unprepare (GstRTSPMedia * media)
|
||||||
} else {
|
} else {
|
||||||
finish_unprepare (media);
|
finish_unprepare (media);
|
||||||
}
|
}
|
||||||
if (media->source) {
|
|
||||||
g_source_destroy (media->source);
|
|
||||||
g_source_unref (media->source);
|
|
||||||
media->source = NULL;
|
|
||||||
}
|
|
||||||
g_rec_mutex_unlock (&media->state_lock);
|
g_rec_mutex_unlock (&media->state_lock);
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
|
Loading…
Reference in a new issue