summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2006-07-17 17:15:34 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2006-07-17 17:15:34 +0000
commit043b2d4a683b528576b5d94d328282cefc41fe5f (patch)
treeaca9cbff8a81a4a3973063fc55e5b076a4dc8de7
parentc57a76a97512d909163da5393e91af4dd8243fb8 (diff)
downloadxine-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
-rw-r--r--ChangeLog1
-rw-r--r--doc/man/en/xine.511
-rw-r--r--src/input/input_dvd.c18
3 files changed, 18 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a03bbc34..795c8e4a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,7 @@ xine-lib (1.1.3)
0.9 API (Pulseaudio is Polypaudio renamed).
* Mark Polypaudio audio plugin as deprecated, as upstream changed APIs at
least two times in the mean time.
+ * Allow 0 for DVD title/chapter (navigation or full title).
xine-lib (1.1.2)
* Security fixes:
diff --git a/doc/man/en/xine.5 b/doc/man/en/xine.5
index aeedd3855..b8d96cd20 100644
--- a/doc/man/en/xine.5
+++ b/doc/man/en/xine.5
@@ -78,6 +78,9 @@ Several MRLs may be specified in order to play a number of consecutive
streams. Additional input plugins will provide additional MRL types. The ones
listed above are available with stock libxine...
.br
+As of xine-lib 1.1.3, the DVD title number may be 0 (select navigation) and
+the chapter number may be 0 (full title).
+.br
.SS VCD MRL Syntax
A simple \fBvcd:/\fP runs the default item (e.g. perhaps track 1 or entry 0)
using the default VCD device (perhaps /dev/cdrom). Both the default item and
@@ -115,7 +118,7 @@ unit to to use in a MRL is none is given. Another configuration setting,
When you hit the VCD button, that is equivalent to entering \fBvcd:/\fP and
thus these two configuration settings are used to expand the MRL.
-Some examples of MRLS are given below. In the examples, we assume the
+Some examples of MRLs are given below. In the examples, we assume the
following configuration settings:
.TP
@@ -143,12 +146,12 @@ should be same as above but is currently broken?
Play Track 1 from /dev/cdrom2
.TP
.BI vcd:///dev/cdrom@S1
-Play segment 1 from /dev/cdrom. This assumes there *is* a segment 1. Check
-the MRL list to see if that is the case.
+Play segment 1 from /dev/cdrom. This assumes that there *is* a segment 1.
+Check the MRL list to see if that is the case.
.TP
.BI vcd://@P1
Play playlist item 1 from default device. If there is no playback control,
-MRL will get converted into vcd:/:E0.
+the MRL will be converted into vcd:/@E0.
Again check the MRL list to see if there is a P1.
.TP
.BI vcd://@P1*
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");