summaryrefslogtreecommitdiffstats
path: root/stream/stream_dvdnav.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream/stream_dvdnav.c')
-rw-r--r--stream/stream_dvdnav.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c
index b87fdaa4c5..5932fd049c 100644
--- a/stream/stream_dvdnav.c
+++ b/stream/stream_dvdnav.c
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include "options.h"
#include "mp_msg.h"
#include "osdep/timer.h"
#include "input/input.h"
@@ -379,9 +380,9 @@ static int fill_buffer(stream_t *s, char *but, int len)
priv->state &= ~NAV_FLAG_WAIT;
if (priv->state & NAV_FLAG_WAIT_READ_AUTO)
priv->state |= NAV_FLAG_WAIT_READ;
- if(priv->title > 0 && dvd_last_chapter > 0) {
+ if(priv->title > 0 && s->opts->chapterrange[1] > 0) {
int tit=0, part=0;
- if(dvdnav_current_title_info(priv->dvdnav, &tit, &part) == DVDNAV_STATUS_OK && part > dvd_last_chapter) {
+ if(dvdnav_current_title_info(priv->dvdnav, &tit, &part) == DVDNAV_STATUS_OK && part > s->opts->chapterrange[1]) {
priv->state |= NAV_FLAG_EOF;
return 0;
}