diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-01-14 13:36:23 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2010-01-14 13:36:23 +0100 |
commit | 3b842bc98b73a568f0fab91624b9549c415e16ba (patch) | |
tree | 065ccda5fce5f09a1b595c3f41340b37d0dce9cc | |
parent | 36fee21834b5038cc0f17e701557d6721374e70b (diff) |
playsink: Fix disabling of subtitles if subtitles were used before
In this case the video still goes through the text chain and
subtitles are still going in there, in case subtitles are
enabled again. This makes sure that re-enabling subtitles
happens instantly.
Fixes hanging video when disabling subtitles, caused by an
unliked video pad.
-rw-r--r-- | gst/playback/gstplaysink.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c index 0887f7a7..aaed6564 100644 --- a/gst/playback/gstplaysink.c +++ b/gst/playback/gstplaysink.c @@ -1787,7 +1787,8 @@ gst_play_sink_reconfigure (GstPlaySink * playsink) add_chain (GST_PLAY_CHAIN (playsink->videochain), TRUE); activate_chain (GST_PLAY_CHAIN (playsink->videochain), TRUE); /* if we are not part of vis or subtitles, set the ghostpad target */ - if (!need_vis && !need_text) { + if (!need_vis && !need_text && !playsink->text_pad + && !playsink->textchain) { GST_DEBUG_OBJECT (playsink, "ghosting video sinkpad"); gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->video_pad), playsink->videochain->sinkpad); @@ -1859,7 +1860,7 @@ gst_play_sink_reconfigure (GstPlaySink * playsink) } if (!need_video && playsink->video_pad) gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->video_pad), NULL); - if (playsink->text_pad) + if (playsink->text_pad && !playsink->textchain) gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (playsink->text_pad), NULL); } |