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 350044 - [dvdsubdec] outputs buffers with negative durations
[dvdsubdec] outputs buffers with negative durations
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
0.10.x
Other All
: Normal major
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 343348
 
 
Reported: 2006-08-05 10:11 UTC by Frédéric Riss
Modified: 2006-08-07 10:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Patch to fix the duration computation of output buffers (762 bytes, patch)
2006-08-05 10:20 UTC, Frédéric Riss
committed Details | Review

Description Frédéric Riss 2006-08-05 10:11:39 UTC
Please describe the problem:
This is a big regression from gstreamer 0.8 where subtitles where working correctly.

Steps to reproduce:
1. Put a DVD in your DVD reader
2. Try to show subtitles in Totem



Actual results:
You realize that subtitles aren't available in totem's menu

Expected results:
Well, I'd like to be able to switch between available subtitles

Does this happen every time?
Yes

Other information:
I asked on IRC some time ago and Tim told me the issue was in the dvdsubdec element and appeared when he (IIRC) ported it to gstreamer 0.10. I think I found  one issue that prevented it from working (I'll attach a patch soonish), but I still need some help to get things fully working.
Comment 1 Frédéric Riss 2006-08-05 10:20:19 UTC
Created attachment 70253 [details] [review]
Patch to fix the duration computation of output buffers

The current code sets the output buffers duration to a negative value! The attached one-liner fixes that:

2006-08-05  Frederic Riss  <frederic.riss@gmail.com>

	* gst/dvdsub/gstdvdsubdec.c (gst_send_subtitle_frame): Unless
	we're playing 'Back to the future', we'd better use positive 
	buffer durations.  
	
With this patch, I'm able to display the subtitles in an empty window using a pipeline along the line of:

gst-launch-0.10 <src>  ! dvdsubdec ! ffmpegcolorspace ! xvimagesink

where <src> is either a dvddemux on a vob file or a matroska demux on a matroska file embedding VOBSUBs with my patch in bug 343348 applied.

I still don't manage to build a pipeline where I use videomixer to mix the decoded video with the subtitles... Possibly related, subtitles still don't work in totem. So where should I look next to make all this working ?
Comment 2 Tim-Philipp Müller 2006-08-07 10:33:08 UTC
Nice catch!

http://webcvs.freedesktop.org/gstreamer/gstreamer/gst/gstclock.h?r1=1.42&r2=1.43

seems related ;)

Committed to CVS:

  2006-08-07  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Frédéric Riss  <frederic.riss at gmail com>

        * gst/dvdsub/gstdvdsubdec.c: (gst_send_subtitle_frame):
          Don't set negative durations on outgoing buffers (#350044),
          which happens when you use macros that got changed during
          the last unstable cycle because they were thought not to
          be used anywhere.


As for VOB subtitle support in totem, that mostly needs implementing in playbin. There needs to be an image mixer (but preferably not videomixer, since we really don't want to convert the input video stream into AYUV just to blit the subtitles on top and then convert back again) etc.

Also, mpegdemux/dvddemux need to send newsegment updates as events to fill in the gaps, and the videomixer needs to handle this properly.

I've got such a mixer element somewhere (but then got distracted with other things), will try to dig it out again and see if it works now that the durations are fixed.

(changed bug description since that is what will appear in the module's release notes; feel free to open a new bug against -base for the playbin-related work that needs to be done)