added null-checks around calls in close()
see http://bugs.campware.org/view.php?id=1444
This commit is contained in:
parent
ae6fb6216d
commit
0a92d1d5ea
1 changed files with 13 additions and 5 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
|
||||
Author : $Author: maroy $
|
||||
Version : $Revision: 1.12 $
|
||||
Version : $Revision: 1.13 $
|
||||
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/playlistExecutor/src/GstreamerPlayer.cxx,v $
|
||||
|
||||
------------------------------------------------------------------------------*/
|
||||
|
@ -444,10 +444,18 @@ GstreamerPlayer :: close(void) throw ()
|
|||
}
|
||||
|
||||
gst_element_set_state(pipeline, GST_STATE_NULL);
|
||||
gst_element_unlink(filesrc, decoder);
|
||||
gst_element_unlink(decoder, audiosink);
|
||||
gst_bin_remove(GST_BIN(pipeline), decoder);
|
||||
gst_bin_remove(GST_BIN(pipeline), filesrc);
|
||||
if (filesrc && decoder) {
|
||||
gst_element_unlink(filesrc, decoder);
|
||||
}
|
||||
if (decoder && audiosink) {
|
||||
gst_element_unlink(decoder, audiosink);
|
||||
}
|
||||
if (decoder) {
|
||||
gst_bin_remove(GST_BIN(pipeline), decoder);
|
||||
}
|
||||
if (filesrc) {
|
||||
gst_bin_remove(GST_BIN(pipeline), filesrc);
|
||||
}
|
||||
filesrc = 0;
|
||||
decoder = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue