mirror of
https://github.com/mpv-player/mpv
synced 2024-12-24 15:52:25 +00:00
dvd: add an extra chapter at position 0
This way, chapter 0 will always point to the start of the title. At least this is the intention; it's likely that DVDs as well as libdvdnav do random things that lead to random results.
This commit is contained in:
parent
8c927376a1
commit
13ae78d207
@ -489,7 +489,7 @@ static int control(stream_t *stream, int cmd, void *arg)
|
||||
break;
|
||||
if (!part)
|
||||
break;
|
||||
*(unsigned int *)arg = part;
|
||||
*(unsigned int *)arg = part + 1;
|
||||
return 1;
|
||||
}
|
||||
case STREAM_CTRL_GET_CHAPTER_TIME: {
|
||||
@ -503,7 +503,7 @@ static int control(stream_t *stream, int cmd, void *arg)
|
||||
break;
|
||||
if (chapter < 0 || chapter >= n)
|
||||
break;
|
||||
*ch = parts[chapter] / 90000.0;
|
||||
*ch = chapter > 0 ? parts[chapter - 1] / 90000.0 : 0;
|
||||
free(parts);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user