[MPlayer-cvslog] r30809 - trunk/stream/stream_cue.c

reimar subversion at mplayerhq.hu
Mon Mar 1 21:11:11 CET 2010


Author: reimar
Date: Mon Mar  1 21:11:11 2010
New Revision: 30809

Log:
Fix off-by-one error in chapter<->VCD track conversion.

Modified:
   trunk/stream/stream_cue.c

Modified: trunk/stream/stream_cue.c
==============================================================================
--- trunk/stream/stream_cue.c	Mon Mar  1 21:07:37 2010	(r30808)
+++ trunk/stream/stream_cue.c	Mon Mar  1 21:11:11 2010	(r30809)
@@ -555,7 +555,7 @@ static int control(stream_t *stream, int
     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 @@ static int control(stream_t *stream, int
     }
     case STREAM_CTRL_GET_CURRENT_CHAPTER:
     {
-      *(unsigned int *)arg = cue_current_pos.track;
+      *(unsigned int *)arg = cue_current_pos.track - 1;
       return STREAM_OK;
     }
   }


More information about the MPlayer-cvslog mailing list