mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
gst/playback/gstplaysink.c: Don't try to do crazy things when we only have a text pad without a video pad. Fixes #559...
Original commit message from CVS: * gst/playback/gstplaysink.c: (gst_play_sink_reconfigure): Don't try to do crazy things when we only have a text pad without a video pad. Fixes #559478.
This commit is contained in:
parent
67b54151fe
commit
9045e0428e
2 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-11-10 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* gst/playback/gstplaysink.c: (gst_play_sink_reconfigure):
|
||||
Don't try to do crazy things when we only have a text pad without a
|
||||
video pad. Fixes #559478.
|
||||
|
||||
2008-11-06 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* gst-libs/gst/riff/riff-media.c: (gst_riff_create_audio_caps):
|
||||
|
|
|
@ -1175,6 +1175,10 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
|||
|
||||
/* figure out which components we need */
|
||||
if (flags & GST_PLAY_FLAG_TEXT && playsink->text_pad) {
|
||||
/* we need video too */
|
||||
if (!playsink->video_pad)
|
||||
goto subs_but_no_video;
|
||||
|
||||
/* we have subtitles and we are requested to show it, we also need to show
|
||||
* video in this case. */
|
||||
need_video = TRUE;
|
||||
|
@ -1311,6 +1315,16 @@ gst_play_sink_reconfigure (GstPlaySink * playsink)
|
|||
GST_PLAY_SINK_UNLOCK (playsink);
|
||||
|
||||
return TRUE;
|
||||
|
||||
/* ERRORS */
|
||||
subs_but_no_video:
|
||||
{
|
||||
GST_ELEMENT_ERROR (playsink, STREAM, FORMAT,
|
||||
(_("Can't play a text file without video.")),
|
||||
("Have text pad but no video pad"));
|
||||
GST_PLAY_SINK_UNLOCK (playsink);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue