GNOME Bugzilla – Bug 453322
dvdreadsrc ignores chapter specification when starting playback
Last modified: 2015-05-12 12:07:28 UTC
Please describe the problem: dvdreadsrc always starts playback of title with first chapter, even when the chapter property is explicitly set to some other value Steps to reproduce: 1. gst-launch dvdreadsrc device=${DEVICE} chapter=5 ! dvddemux .current_video ! mpeg2dec ! ffmpegcolorspace ! glimagesink Actual results: The title is played from the very beginning Expected results: The title is expected to be played from the selected chapter Does this happen every time? YES Other information:
Created attachment 91089 [details] the command line for gst-launch and the log shell transcript and log with GST_DEBUG_LOG=dvdreadsrc:5
when gst_dvd_read_src_start is called, it calls in turn gst_dvd_read_src_goto_chapter, which sets cur_pack to some value. After that, gst_dvd_read_src_do_seek seeks to byte 0, effectively setting chapter to 0 (uri_chapter = 1)
Yea, it's very annoying do not have an ability to start DCD playback with needed chapter.
Is this bug still valid now that we have the resin plugin ?
Created attachment 140590 [details] [review] A very simple patch that makes dvdreadsrc ignore the first seek from the base class At a glance, this seems to be that way that the resin-dvd plugin deals with this problem. Ignoring the first seek event seems to make the chapter property on dvdreadsrc work as expected. I think the dvdreadsrc plugin is still relevant because the new resin-dvd plugin is (as far as I'm aware!) designed purely for DVD playback, and not so useful when you want to transcode a specific title - which is what I use dvdreadsrc for.
> I think the dvdreadsrc plugin is still relevant Fully agree. Thanks for the patch!
Is this still relevant for 1.x ? The code changed quite a bit since that patch, but if basesrc still does a initial seek I guess it should be applied.
Urk. I just pushed the same patch for this, and Tim pointed out this 5 year old bug. Anyway - fixed now! commit 5dfd112521a026a323922c2f392095eae2c91ea2 Author: Jan Schmidt <jan@centricular.com> Date: Tue May 12 22:05:02 2015 +1000 dvdread: Also reset the first_seek var in start() Make the initial chapter seek work across reuse. https://bugzilla.gnome.org/show_bug.cgi?id=453322 commit bc7e8282d3734949f4696bd846bd092a7c37feb6 Author: Jan Schmidt <jan@centricular.com> Date: Tue May 12 21:52:24 2015 +1000 dvdread: Work around basesrc initial seek Ignore the initial seek basesrc sends, as it breaks starting from another chapter by immediately seeking back to the start of the title