diff options
-rw-r--r-- | stream/stream_dvdnav.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c index 67436aa5e6..92252aa5a4 100644 --- a/stream/stream_dvdnav.c +++ b/stream/stream_dvdnav.c @@ -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; } |