From 20fcc5c6ef76fea4b1f0f627170777e3fab8b950 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 1 Mar 2010 20:11:11 +0000 Subject: Fix off-by-one error in chapter<->VCD track conversion. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30809 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_cue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stream') diff --git a/stream/stream_cue.c b/stream/stream_cue.c index 44e659b5f3..c356827782 100644 --- a/stream/stream_cue.c +++ b/stream/stream_cue.c @@ -555,7 +555,7 @@ static int control(stream_t *stream, int cmd, void *arg) { 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 cmd, void *arg) { } case STREAM_CTRL_GET_CURRENT_CHAPTER: { - *(unsigned int *)arg = cue_current_pos.track; + *(unsigned int *)arg = cue_current_pos.track - 1; return STREAM_OK; } } -- cgit v1.2.3