summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortholin <tholin@nowhere>2014-07-03 23:27:49 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-07-05 00:29:17 +0200
commitbd271ae1cc9360ec00ec2ddf2c8593010184aa0c (patch)
tree668b343b4d40bed9d2415b133677bbaf6ce37735
parentc71644b5959f0db19e68f1d5e17ad53ccea46fd4 (diff)
downloadmpv-bd271ae1cc9360ec00ec2ddf2c8593010184aa0c.tar.bz2
mpv-bd271ae1cc9360ec00ec2ddf2c8593010184aa0c.tar.xz
stream_dvdnav: check the length of all titles with dvdnav://longest
The last title was ignored before. CC: @mpv-player/stable Signed-off-by: wm4 <wm4@nowhere>
-rw-r--r--stream/stream_dvdnav.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index 6b5b4ef14b..9be03c6914 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -698,7 +698,7 @@ static int open_s(stream_t *stream)
int best_title = -1;
int32_t num_titles;
if (dvdnav_get_number_of_titles(dvdnav, &num_titles) == DVDNAV_STATUS_OK) {
- for (int n = 1; n < num_titles; n++) {
+ for (int n = 1; n <= num_titles; n++) {
uint64_t *parts = NULL, duration = 0;
dvdnav_describe_title_chapters(dvdnav, n, &parts, &duration);
if (parts) {