comparison menus.c @ 6:3fd49361fcc8

add start part parameter
author paulo@twcdns.fastsearch.net
date Sun, 06 Feb 2011 23:58:29 -0800
parents ec2f201219ff
children aa7d0e4f300e
comparison
equal deleted inserted replaced
4:68cf4302a655 5:60e3a0ea73cc
77 if (dvdnav_set_PGC_positioning_flag(dvdnav, 1) != DVDNAV_STATUS_OK) { 77 if (dvdnav_set_PGC_positioning_flag(dvdnav, 1) != DVDNAV_STATUS_OK) {
78 printf("Error on dvdnav_set_PGC_positioning_flag: %s\n", dvdnav_err_to_string(dvdnav)); 78 printf("Error on dvdnav_set_PGC_positioning_flag: %s\n", dvdnav_err_to_string(dvdnav));
79 return 2; 79 return 2;
80 } 80 }
81 81
82 /* start at title, if specified */ 82 /* start at title and part, if specified */
83 if (argc > 1) { 83 if (argc > 1) {
84 int start_title = atoi(argv[1]); 84 int start_title = atoi(argv[1]);
85 dvdnav_title_play(dvdnav, start_title); 85 int start_part = 1;
86 if (argc > 2)
87 start_part = atoi(argv[2]);
88 dvdnav_part_play(dvdnav, start_title, start_part);
86 } 89 }
87 90
88 /* the read loop which regularly calls dvdnav_get_next_block 91 /* the read loop which regularly calls dvdnav_get_next_block
89 * and handles the returned events */ 92 * and handles the returned events */
90 printf("Reading...\n"); 93 printf("Reading...\n");