[DVDnav-discuss] r1157 - trunk/libdvdnav/examples/menus.c

diego subversion at mplayerhq.hu
Fri Oct 10 00:24:53 CEST 2008


Author: diego
Date: Fri Oct 10 00:24:53 2008
New Revision: 1157

Log:
Allow specifying the DVD device as program argument.
patch by KO Myung-Hun, komh chollian net


Modified:
   trunk/libdvdnav/examples/menus.c

Modified: trunk/libdvdnav/examples/menus.c
==============================================================================
--- trunk/libdvdnav/examples/menus.c	(original)
+++ trunk/libdvdnav/examples/menus.c	Fri Oct 10 00:24:53 2008
@@ -48,9 +48,14 @@ int main(int argc, char **argv) {
   int output_fd = 0;
   int dump = 0, tt_dump = 0;
 
+  if (argc < 2) {
+    printf("Specify DVD device.\n");
+    return 1;
+  }
+
   /* open dvdnav handle */
   printf("Opening DVD...\n");
-  if (dvdnav_open(&dvdnav, "/dev/dvd") != DVDNAV_STATUS_OK) {
+  if (dvdnav_open(&dvdnav, argv[1]) != DVDNAV_STATUS_OK) {
     printf("Error on dvdnav_open\n");
     return 1;
   }



More information about the DVDnav-discuss mailing list