playsink: Avoid a segfault when the video sink fails to start

Don't attempt to display the subpictures and segfault when the
video sink failed to start (and hence the videochain is NULL).
This commit is contained in:
Jan Schmidt 2009-06-29 14:34:02 +01:00
parent 8601862e27
commit ee7fd4c28d

View file

@ -1872,7 +1872,7 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->text_pad), NULL);
}
if (need_subp) {
if (need_subp && playsink->videochain) {
GST_DEBUG_OBJECT (playsink, "adding subpicture");
if (!playsink->subpchain) {
GST_DEBUG_OBJECT (playsink, "creating subpicture chain");