summaryrefslogtreecommitdiffstats
path: root/stream/stream_bluray.c
diff options
context:
space:
mode:
authorRicardo Constantino <wiiaboo@gmail.com>2017-01-16 15:47:13 +0000
committerRicardo Constantino <wiiaboo@gmail.com>2017-01-16 16:03:15 +0000
commitfb6481ecb5e3a950fbec3ae76ad29352576b2aaf (patch)
tree70ff0aa48ca361b79052382b58940a21a89da841 /stream/stream_bluray.c
parent083e470091460c0b2a22da6bbd0fce55de1426ed (diff)
downloadmpv-fb6481ecb5e3a950fbec3ae76ad29352576b2aaf.tar.bz2
mpv-fb6481ecb5e3a950fbec3ae76ad29352576b2aaf.tar.xz
stream_bluray: use proper 0-based idx
Even though the title list code was copied from FFmpeg/libbluray, I didn't check that mpv used 0-based title indexing. $ mpv bd://1 --bluray-device=. --msg-level=bd=v [bd] Opening bd:// [bd] List of available titles: [bd] idx: 1 duration: 00:00:36 (playlist: 00000.mpls) [bd] idx: 2 duration: 01:31:30 (playlist: 00001.mpls) [bd] idx: 3 duration: 00:00:50 (playlist: 00003.mpls) bd://1 actually opens idx 2 from the list, not 1. bd://mpls/1 opens playlist 00001.mpls as expected. With this commit: $ mpv bd://1 --bluray-device=. --msg-level=bd=v [bd] Opening bd:// [bd] List of available titles: [bd] idx: 0 duration: 00:00:36 (playlist: 00000.mpls) [bd] idx: 1 duration: 01:31:30 (playlist: 00001.mpls) [bd] idx: 2 duration: 00:00:50 (playlist: 00003.mpls) should play the expected idx 1.
Diffstat (limited to 'stream/stream_bluray.c')
-rw-r--r--stream/stream_bluray.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_bluray.c b/stream/stream_bluray.c
index 5f083954c2..e648337b93 100644
--- a/stream/stream_bluray.c
+++ b/stream/stream_bluray.c
@@ -425,7 +425,7 @@ static int bluray_stream_open_internal(stream_t *s)
char *time = mp_format_time(ti->duration / 90000, false);
MP_VERBOSE(s, "idx: %3d duration: %s (playlist: %05d.mpls)\n",
- i + 1, time, ti->playlist);
+ i, time, ti->playlist);
talloc_free(time);
/* try to guess which title may contain the main movie */