diff options
author | sL1pKn07 | 2017-01-09 20:17:59 +0100 |
---|---|---|
committer | sL1pKn07 | 2017-01-09 20:18:57 +0100 |
commit | ab99bb56e509526490417a9748d45c1445bff67d (patch) | |
tree | 60a121bfff26e9e739c9982cd43d45bb7a9d0e50 /switch_title-switch-to-next-title-if-no-parameter-passed.patch | |
parent | 44a3295745954ffd5cb1767224de180b2cbb8932 (diff) | |
download | aur-ab99bb56e509526490417a9748d45c1445bff67d.tar.gz |
bump
Diffstat (limited to 'switch_title-switch-to-next-title-if-no-parameter-passed.patch')
-rw-r--r-- | switch_title-switch-to-next-title-if-no-parameter-passed.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/switch_title-switch-to-next-title-if-no-parameter-passed.patch b/switch_title-switch-to-next-title-if-no-parameter-passed.patch new file mode 100644 index 000000000000..6d67d44f9426 --- /dev/null +++ b/switch_title-switch-to-next-title-if-no-parameter-passed.patch @@ -0,0 +1,20 @@ +diff --git a/stream/stream_dvdnav.c b/stream/stream_dvdnav.c +index 6bdc59d..1a94249 100644 +--- a/stream/stream_dvdnav.c ++++ b/stream/stream_dvdnav.c +@@ -879,6 +879,13 @@ void mp_dvdnav_switch_title (stream_t *stream, int title) { + uint32_t titles; + + dvdnav_get_number_of_titles (priv->dvdnav, &titles); ++ if (title <= 0) { ++ /* No parameter -> switch to next title or return to title 1 if the end */ ++ int tit, part; ++ dvdnav_current_title_info(priv->dvdnav, &tit, &part); ++ title = tit+1; ++ } ++ if (title > titles) title = 1; + if (title > 0 && title <= titles) + dvdnav_title_play (priv->dvdnav, title); + } + + |