GNOME Bugzilla – Bug 350044
[dvdsubdec] outputs buffers with negative durations
Last modified: 2006-08-07 10:33:08 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.
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 ?
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)