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 334322 - [mpegdemux] playbin freezes with VobSub subtitles
[mpegdemux] playbin freezes with VobSub subtitles
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other All
: Normal critical
: 0.10.5
Assigned To: Tim-Philipp Müller
Maintainer alias for GStreamer component of Totem
Depends on:
Blocks:
 
 
Reported: 2006-03-12 14:47 UTC by Lukáš 'Spike' Polívka
Modified: 2006-11-19 13:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
combine flow returns in mpegdemux and dvddemux (16.46 KB, patch)
2006-11-02 11:35 UTC, Tim-Philipp Müller
committed Details | Review

Description Lukáš 'Spike' Polívka 2006-03-12 14:47:12 UTC
Steps to reproduce:
1. Load a movie file (AVI, XVID, AC3 in this case) with VobSub (.sub and .idx)
subtitles in the same directory using the Movie>Open dialogue.
2. Totem stops responding.

Stack trace:
Starting program: /usr/local/bin/totem 
[Thread debugging using libthread_db enabled]
[New Thread -1217489232 (LWP 4400)]
[New Thread -1223890016 (LWP 4403)]

** (totem:4400): WARNING **: Trying to connect to an older version of the GNOME
screensaver
[New Thread -1224995936 (LWP 4411)]
[New Thread -1234396256 (LWP 4412)]

Program received signal SIG33, Real-time event 33.
[Switching to Thread -1224995936 (LWP 4411)]
0xffffe410 in __kernel_vsyscall ()
(gdb) thread apply all 
Display all 39883 possibilities? (y or n)
(gdb) thread apply all bt


Other information:
Comment 1 Tim-Philipp Müller 2006-11-02 11:21:08 UTC
playbin/totem still freeze with vobsub subtitles specified. This is because mpegdemux/dvddemux don't accumulate flow returns properly, and don't return FLOW_NOT_LINKED upstream when all pads are unlinked. Same thing happens with Fluendo's mpeg demuxer.

Fixing this might not be entirely straight-forward, since flow combination should only really happen once all source pads have been created, but we don't really know when that is due to the way mpeg works (and mpegdemux never emits a no-more-pads for the same reason AFAIK).
Comment 2 Tim-Philipp Müller 2006-11-02 11:35:36 UTC
Created attachment 75836 [details] [review]
combine flow returns in mpegdemux and dvddemux

First attempt at a patch that combines flow returns for mpegdemux and dvddemux. The assumption is that in practice packets for different streams are interleaved in certain max. intervals, so once at least N buffers have been pushed on all so-far created pads, chances are pretty good that we have all our pads (or at least all the ones that we are looking for). Seems to work so far with the files I've tested it with, but haven't tested DVD streams yet.
Comment 3 Tim-Philipp Müller 2006-11-19 13:10:37 UTC
 2006-11-19  Tim-Philipp Müller  <tim at centricular dot net>

	* gst/mpegstream/gstdvddemux.c: (gst_dvd_demux_base_init),
	(gst_dvd_demux_class_init), (gst_dvd_demux_combine_flows),
	(gst_dvd_demux_send_subbuffer):
	* gst/mpegstream/gstmpegdemux.c: (gst_mpeg_demux_class_init),
	(gst_mpeg_demux_init_stream), (gst_mpeg_demux_parse_packet),
	(gst_mpeg_demux_parse_pes), (gst_mpeg_demux_combine_flows),
	(gst_mpeg_demux_send_subbuffer):
	* gst/mpegstream/gstmpegdemux.h:
	* gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_process_event),
	(gst_mpeg_parse_chain):
	  Fix flow value combination; this fixes playbin/totem locking up if
	  a VobSub file is specified as subtitle file (#334322). Flow value
	  combination should only happen once we are fairly sure we've got all
	  pads that are available for now. Since there isn't a well-specified
	  time when this is the case in MPEG, we'll just assume this is the
	  case once there has been a certain number of packets for each
	  stream we've found so far.