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
This commit is contained in:
reimar 2010-03-01 20:11:11 +00:00
parent 4464a64ff7
commit 20fcc5c6ef
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}