From ee7fd4c28d7aa3a120ccf0b29f44da21dc036c42 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 29 Jun 2009 14:34:02 +0100 Subject: [PATCH] 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). --- gst/playback/gstplaysink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index c597ad6682..7e5101bb59 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -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");