changeset 30767:29588c0eafd3

Fix off-by-one error in chapter<->VCD track conversion.
author reimar
date Mon, 01 Mar 2010 20:11:11 +0000
parents 6c5e12f5820b
children 6032dd934340
files stream/stream_cue.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/stream/stream_cue.c	Mon Mar 01 20:07:37 2010 +0000
+++ b/stream/stream_cue.c	Mon Mar 01 20:11:11 2010 +0000
@@ -555,7 +555,7 @@
     case STREAM_CTRL_SEEK_TO_CHAPTER:
     {
       int r;
-      unsigned int track = *(unsigned int *)arg;
+      unsigned int track = *(unsigned int *)arg + 1;
       r = cue_vcd_seek_to_track(track);
       if (r >= 0) {
         stream->start_pos = r;
@@ -566,7 +566,7 @@
     }
     case STREAM_CTRL_GET_CURRENT_CHAPTER:
     {
-      *(unsigned int *)arg = cue_current_pos.track;
+      *(unsigned int *)arg = cue_current_pos.track - 1;
       return STREAM_OK;
     }
   }