GNOME Bugzilla – Bug 610379
[playbin2] doesn't play if text flag is unset and media has text subtitles
Last modified: 2010-02-19 17:07:40 UTC
Running the following pipeline: gst-launch-0.10 playbin2 flags=0x13 uri= <media with some text pads> The pipeline never goes to playing.
Created attachment 154155 [details] [review] Patch that mitgate/fix the issue This patch avoid connect the text pads to the inputselector if the related flag is unset in playsink. This fixes the issue in my tests, but I'm not sure if it's the best way to fix the issue.
(In reply to comment #1) > Created an attachment (id=154155) [details] [review] > Patch that mitgate/fix the issue > > This patch avoid connect the text pads to the inputselector if the related flag > is unset in playsink. > > This fixes the issue in my tests, but I'm not sure if it's the best way to fix > the issue. No, it's not the correct way to fix it. If the flag is set again later the subtitles won't be rendered. What exactly is the reason for this to be broken?
The pipelines that I tried with the flags set to 0x13 and with text content stay on preroll forever and it's not going into playing. I was expecting just the text streams be ignored and be able to play audio and video of the content when the text flag was unset.
Yes, that would be the expected behaviour :) Last time I tried it, this worked. I'll take a look at this later
Created attachment 154221 [details] [review] playsink: Ghost the video sinkpad if a text sinkpad is available Only don't ghost it if no visualizations are need and if no text is needed and no textchain was created yet. Fixes bug #610379.
So the problem is the following here (copied from IRC): ->text_pad is non-NULL if playbin2 requested one (which is always the case if the media contains text streams). this resulted in the video pad being not ghosted (i.e. NULL target) by the video specific code there if text pad was requested. later in the text code, a video pad would be ghosted to subtitleoverlay but unfortunately no text chain was generated because the text flag wasn't set on playbin2. This resulted in the video pad having no peer and everything was unhappy :) in the case where text is disabled via flags but a textchain already exists, the text code below makes sure that the video pad is connected to subtitleoverlay and that subtitles are only disabled (via textoverlay property, etc)
commit 9fa9834535c0e14e36af0acd0ad63ae3f469d8f4 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Fri Feb 19 17:44:18 2010 +0100 playsink: Ghost the video sinkpad if a text sinkpad is available Only don't ghost it if no visualizations are need and if no text is needed and no textchain was created yet. Fixes bug #610379.
Works for me, thanks.