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 429960 - [mpegdemux] playbin hangs with small external vobsub subtitles
[mpegdemux] playbin hangs with small external vobsub subtitles
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal normal
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-15 12:59 UTC by Sebastien Bacher
Modified: 2007-04-16 16:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
patch: make gst-plugins-ugly mpegdemux throw an error on EOS if it wasn't handled anywhere downstream (1.90 KB, patch)
2007-04-16 16:05 UTC, Tim-Philipp Müller
committed Details | Review

Description Sebastien Bacher 2007-04-15 12:59:09 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/totem/+bug/102220

"Binary package hint: totem-gstreamer

In feisty (bug is present in edgy as well) totem-gstreamer hangs when trying to play a movie with external subs in the idx/sub format.
...
take a random .avi. rename it to test.avi. place test.idx and test.sub in the same folder as test.avi.
try to play the test.avi with totem -> totem hangs.

http://librarian.launchpad.net/7317168/test.idx
test.idx

http://librarian.launchpad.net/7317169/test.sub
test.sub"
Comment 1 Sebastien Bacher 2007-04-15 13:00:30 UTC
bug #350299 is also about subtitle use, the description is not the same though
Comment 2 Tim-Philipp Müller 2007-04-15 13:14:07 UTC
This looks like bug #334322, which should be fixed in gst-plugins-ugly 0.10.5 as far as I know.

Are you guys using the fluendo mpeg demuxer by any chance? What's the output of

 $ gst-inspect-0.10 | grep flu

?
Comment 3 ccc1 2007-04-15 15:08:42 UTC
hi, 


> Are you guys using the fluendo mpeg demuxer by any chance? What's the output of
> 
>  $ gst-inspect-0.10 | grep flu

yeah, looks like it. output of gst-inspect-0.10 | grep flu:

flump3dec:  flump3dec: Fluendo MP3 Decoder
flumpegdemux:  flutsdemux: MPEG Transport stream demuxer
flumpegdemux:  flupsdemux: MPEG Program Demuxer

but the bug is not limited to mpeg-videos. exactly the same happens with theora/ogg files. 

btw: gst-plugins-ugly version is 0.10.5



Comment 4 Tim-Philipp Müller 2007-04-15 15:21:51 UTC
> but the bug is not limited to mpeg-videos. exactly the same happens with
> theora/ogg files.

Yes, that's to be expected. An mpeg demuxer will be auto-plugged by decodebin/playbin to demux the .sub subtitle stream. Playbin will wait until either an error occurs or a decoded subtitle picture is produced. Since playbin currently doesn't support subpictures, and the subpicture decoder has a rank of NONE and is not auto-plugged, the subtitle decodebin will treat it as a stream it can't handle and leave it unconnected. The mpeg demuxer should then realise that all of its pads are unconnected and send a FLOW_NOT_LINKED flow return upstream to the source, which will then post an error message, at which point playbin will just ignore the unsupported subtitle URI and continue playing the movie.

If the mpeg demuxer doesn't error out, playbin will just continue to wait for something to happen which will never happen.

This will happen with any video format, because it's the .sub file itself which is an mpeg stream.

 
> btw: gst-plugins-ugly version is 0.10.5

The fluendo mpeg demuxer will trump the mpeg demuxer in gst-plugins-ugly, since its rank is higher. You could try uninstalling it and check if that 'fixes' the problem. Ultimately, this needs to be fixed in the fluendo mpeg demuxer.

Comment 5 ccc1 2007-04-16 06:23:56 UTC
> The fluendo mpeg demuxer will trump the mpeg demuxer in gst-plugins-ugly, since
> its rank is higher. You could try uninstalling it and check if that 'fixes' the
> problem. 

i uninstalled the fluendo mpeg demuxer and now there are two different cases:

1) totem freezes as in the original bugreport

2) totem plays the video file, but no subs are available

the latter case happens with nearly all files i've tested. only a few (for example test.sub and test.idx attached in the first post) show the behavior described in 1). 

> Ultimately, this needs to be fixed in the fluendo mpeg demuxer.

ok. then i'll use vlc or mplayer till this bug is fixed. just thought i'll report the bug, since i wasn't sure if it's already known.
Comment 6 Sebastien Bacher 2007-04-16 13:00:45 UTC
That happens on my Ubuntu 7.04 desktop without the fluendo demux installed
Comment 7 Tim-Philipp Müller 2007-04-16 16:05:29 UTC
Created attachment 86435 [details] [review]
patch: make gst-plugins-ugly mpegdemux throw an error on EOS if it wasn't handled anywhere downstream

Attached patch should fix the hanging problem (the flow aggregation in gstreamer's mpegdemux only works from a minimal threshold, so it fails for very small files)


Looks like there's also a secondary bug, namely a parsing/syncing problem of some sort; mplayer is able to show at least 2 subtitle frames from the file, while 

  .. ! dvddemux name=d d.subpicture_00 ! dvdsubdec ! fakesink

doesn't lead to any output. Doesn't matter that much for now, since we don't support subpictures anyway, but should still be fixed at some point. Will clone a new bug for that.
Comment 8 Tim-Philipp Müller 2007-04-16 16:33:07 UTC
Committed to -ugly CVS:

 2007-04-16  Tim-Philipp Müller  <tim at centricular dot net>

        * gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_process_event),
        (gst_mpeg_parse_send_event):
          Post an error message if EOS wasn't handled by anything downstream.
          This should fix playbin freezing/hanging with small VobSub subtitle
          files (background: not-linked flow returns from downstream are
          ignored for a while at the beginning, so if the file is small
          upstream will never get a not-linked flow return even if nothing
          is connected downstream). (#429960).