[0.10] gst-plugins-ugly: dvdreadsrc: minor safety tweak to sector seeking

Tim Müller tpm at kemper.freedesktop.org
Wed Jan 4 09:05:54 PST 2012


Module: gst-plugins-ugly
Branch: 0.10
Commit: 9f3100bcca33d9e578123dc0f5c61259a96361af
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=9f3100bcca33d9e578123dc0f5c61259a96361af

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Wed Dec 21 13:56:35 2011 +0100

dvdreadsrc: minor safety tweak to sector seeking

---

 ext/dvdread/dvdreadsrc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ext/dvdread/dvdreadsrc.c b/ext/dvdread/dvdreadsrc.c
index f1dbfbc..7675dc7 100644
--- a/ext/dvdread/dvdreadsrc.c
+++ b/ext/dvdread/dvdreadsrc.c
@@ -1585,7 +1585,8 @@ gst_dvd_read_src_goto_sector (GstDvdReadSrc * src, int angle)
       gint first = src->cur_pgc->cell_playback[cur].first_sector;
       gint last = src->cur_pgc->cell_playback[cur].last_sector;
       GST_DEBUG_OBJECT (src, "Cell %d sector bounds: %d %d", cur, first, last);
-      if (seek_to >= first && seek_to <= last) {
+      /* seeking to 0 should end up at first chapter in any case */
+      if ((seek_to >= first && seek_to <= last) || (seek_to == 0 && i == 0)) {
         GST_DEBUG_OBJECT (src, "Seek target found in chapter %d", i);
         chapter = i;
         goto done;



More information about the gstreamer-commits mailing list