1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 14:52:43 +00:00

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.
This commit is contained in:
Ricardo Constantino 2017-01-16 15:47:13 +00:00
parent 083e470091
commit fb6481ecb5
No known key found for this signature in database
GPG Key ID: EFD16019AE4FF531

View File

@ -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 */