After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610379 - [playbin2] doesn't play if text flag is unset and media has text subtitles
[playbin2] doesn't play if text flag is unset and media has text subtitles
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal blocker
: 0.10.27
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-18 17:51 UTC by Josep Torra Valles
Modified: 2010-02-19 17:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that mitgate/fix the issue (739 bytes, patch)
2010-02-18 17:53 UTC, Josep Torra Valles
rejected Details | Review
playsink: Ghost the video sinkpad if a text sinkpad is available (1.26 KB, patch)
2010-02-19 16:46 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Josep Torra Valles 2010-02-18 17:51:05 UTC
Running the following pipeline:

gst-launch-0.10 playbin2 flags=0x13 uri= <media with some text pads>

The pipeline never goes to playing.
Comment 1 Josep Torra Valles 2010-02-18 17:53:19 UTC
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.
Comment 2 Sebastian Dröge (slomo) 2010-02-18 20:23:22 UTC
(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?
Comment 3 Josep Torra Valles 2010-02-19 10:36:37 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2010-02-19 11:19:31 UTC
Yes, that would be the expected behaviour :) Last time I tried it, this worked. I'll take a look at this later
Comment 5 Sebastian Dröge (slomo) 2010-02-19 16:46:01 UTC
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.
Comment 6 Sebastian Dröge (slomo) 2010-02-19 17:04:24 UTC
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)
Comment 7 Sebastian Dröge (slomo) 2010-02-19 17:05:08 UTC
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.
Comment 8 Tim-Philipp Müller 2010-02-19 17:07:40 UTC
Works for me, thanks.