gst/playback/gstplaybin.c: Set elements to NULL state before disposing of them.

Original commit message from CVS:
* gst/playback/gstplaybin.c: (gst_play_bin_dispose):
Set elements to NULL state before disposing of them.
This commit is contained in:
Tim-Philipp Müller 2005-11-09 16:09:52 +00:00
parent 9a16fb5d49
commit 33fd9d677d
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2005-11-09 Tim-Philipp Müller <tim at centricular dot net>
* gst/playback/gstplaybin.c: (gst_play_bin_dispose):
Set elements to NULL state before disposing of them.
2005-11-08 Sebastien Cote <sebas642 at yahoo dot ca> 2005-11-08 Sebastien Cote <sebas642 at yahoo dot ca>
Reviewed by: Tim-Philipp Müller <tim at centricular dot net> Reviewed by: Tim-Philipp Müller <tim at centricular dot net>

View file

@ -230,14 +230,17 @@ gst_play_bin_dispose (GObject * object)
} }
if (play_bin->audio_sink != NULL) { if (play_bin->audio_sink != NULL) {
gst_element_set_state (play_bin->audio_sink, GST_STATE_NULL);
gst_object_unref (play_bin->audio_sink); gst_object_unref (play_bin->audio_sink);
play_bin->audio_sink = NULL; play_bin->audio_sink = NULL;
} }
if (play_bin->video_sink != NULL) { if (play_bin->video_sink != NULL) {
gst_element_set_state (play_bin->video_sink, GST_STATE_NULL);
gst_object_unref (play_bin->video_sink); gst_object_unref (play_bin->video_sink);
play_bin->video_sink = NULL; play_bin->video_sink = NULL;
} }
if (play_bin->visualisation != NULL) { if (play_bin->visualisation != NULL) {
gst_element_set_state (play_bin->visualisation, GST_STATE_NULL);
gst_object_unref (play_bin->visualisation); gst_object_unref (play_bin->visualisation);
play_bin->visualisation = NULL; play_bin->visualisation = NULL;
} }