gst/playback/gstplaybasebin.c: Set source to NULL so that resources are free'ed. Fixes issues with playback of CDDA a...

Original commit message from CVS:
* gst/playback/gstplaybasebin.c: (setup_source):
Set source to NULL so that resources are free'ed. Fixes issues
with playback of CDDA and similar device-accessing things.
This commit is contained in:
Ronald S. Bultje 2005-01-09 19:29:06 +00:00
parent 543682a3c6
commit 7506b79230
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2005-01-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/playback/gstplaybasebin.c: (setup_source):
Set source to NULL so that resources are free'ed. Fixes issues
with playback of CDDA and similar device-accessing things.
2005-01-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net> 2005-01-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* testsuite/embed/Makefile.am: * testsuite/embed/Makefile.am:

View file

@ -1096,6 +1096,7 @@ setup_source (GstPlayBaseBin * play_base_bin, GError ** error)
} else { } else {
if (old_src) { if (old_src) {
GST_LOG ("removing old src element %s", gst_element_get_name (old_src)); GST_LOG ("removing old src element %s", gst_element_get_name (old_src));
gst_element_set_state (old_src, GST_STATE_NULL);
gst_bin_remove (GST_BIN (play_base_bin->thread), old_src); gst_bin_remove (GST_BIN (play_base_bin->thread), old_src);
} }
gst_bin_add (GST_BIN (play_base_bin->thread), play_base_bin->source); gst_bin_add (GST_BIN (play_base_bin->thread), play_base_bin->source);