diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2006-07-17 17:15:34 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2006-07-17 17:15:34 +0000 |
commit | 043b2d4a683b528576b5d94d328282cefc41fe5f (patch) | |
tree | aca9cbff8a81a4a3973063fc55e5b076a4dc8de7 /src | |
parent | c57a76a97512d909163da5393e91af4dd8243fb8 (diff) | |
download | xine-lib-043b2d4a683b528576b5d94d328282cefc41fe5f.tar.gz xine-lib-043b2d4a683b528576b5d94d328282cefc41fe5f.tar.bz2 |
Allow 0 for title & chapter in DVD MRLs.
CVS patchset: 8131
CVS date: 2006/07/17 17:15:34
Diffstat (limited to 'src')
-rw-r--r-- | src/input/input_dvd.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 13f88c3d6..1bd576dc3 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_dvd.c,v 1.209 2006/07/11 03:22:59 dgp85 Exp $ + * $Id: input_dvd.c,v 1.210 2006/07/17 17:15:34 dsalt Exp $ * */ @@ -1547,7 +1547,7 @@ static int dvd_plugin_open (input_plugin_t *this_gen) { tt = strtol(title_part, NULL, 10); dvdnav_get_number_of_titles(this->dvdnav, &titles); - if((tt <= 0) || (tt > titles)) { + if((tt < 0) || (tt > titles)) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "input_dvd: Title %i is out of range (1 to %i).\n", tt, titles); dvdnav_close(this->dvdnav); @@ -1560,7 +1560,7 @@ static int dvd_plugin_open (input_plugin_t *this_gen) { if(delimiter) { pr = strtol(delimiter+1, NULL, 10); dvdnav_get_number_of_parts(this->dvdnav, tt, &parts); - if ((pr <= 0) || (pr > parts)) { + if ((pr < 0) || (pr > parts)) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "input_dvd: Part %i is out of range (1 to %i).\n", pr, parts); dvdnav_close(this->dvdnav); @@ -1572,11 +1572,13 @@ static int dvd_plugin_open (input_plugin_t *this_gen) { #ifdef INPUT_DEBUG printf("input_dvd: Jumping to TT >%i<, PTT >%i<\n", tt, pr); #endif - if(pr != -1) { - dvdnav_part_play(this->dvdnav, tt, pr); - } else { - dvdnav_title_play(this->dvdnav, tt); - } + if (tt > 0) { + if (pr > 0) + dvdnav_part_play(this->dvdnav, tt, pr); + else + dvdnav_title_play(this->dvdnav, tt); + } else + this->mode = MODE_NAVIGATE; } #ifdef INPUT_DEBUG printf("input_dvd: DVD device successfully opened.\n"); |