summaryrefslogtreecommitdiff
path: root/src/input/libdvdnav/searching.c
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2003-01-13 13:53:33 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2003-01-13 13:53:33 +0000
commitf4dfe9537380c0cd2912fed600a0315a9a651010 (patch)
tree2e3b5327b710fe6d441f0d9c8d7723028ee9d3d7 /src/input/libdvdnav/searching.c
parentf23e502366e29753bc781e4a72fde3c192aa4369 (diff)
downloadxine-lib-f4dfe9537380c0cd2912fed600a0315a9a651010.tar.gz
xine-lib-f4dfe9537380c0cd2912fed600a0315a9a651010.tar.bz2
sync to latest cvs of libdvdnav
* small fix for "Spy Game" RC2 * implement LinkNoLink (Disney's "Beauty and the Beast" RC2 deluxe uses it, but the interactive game still does not work) * slightly improved logic of program jumps -> chapter skipping should work correctly in more (if not all) cases now CVS patchset: 3894 CVS date: 2003/01/13 13:53:33
Diffstat (limited to 'src/input/libdvdnav/searching.c')
-rw-r--r--src/input/libdvdnav/searching.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/input/libdvdnav/searching.c b/src/input/libdvdnav/searching.c
index 6a9e73029..77fc7394d 100644
--- a/src/input/libdvdnav/searching.c
+++ b/src/input/libdvdnav/searching.c
@@ -17,7 +17,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: searching.c,v 1.6 2002/11/18 12:41:16 mroi Exp $
+ * $Id: searching.c,v 1.7 2003/01/13 13:53:33 mroi Exp $
*
*/
@@ -238,14 +238,12 @@ dvdnav_status_t dvdnav_prev_pg_search(dvdnav_t *this) {
return S_ERR;
pthread_mutex_lock(&this->vm_lock);
- /* Make sure this is not the first chapter */
- if(state->pgN <= 1 ) {
- fprintf(MSG_OUT, "libdvdnav: at first chapter. prev chapter failed.\n");
+ fprintf(MSG_OUT, "libdvdnav: previous chapter\n");
+ if (!vm_prev_pg(this->vm)) {
+ fprintf(MSG_OUT, "libdvdnav: prev chapter failed.\n");
pthread_mutex_unlock(&this->vm_lock);
return S_ERR;
}
- fprintf(MSG_OUT, "libdvdnav: previous chapter\n");
- vm_jump_prog(this->vm, state->pgN - 1);
this->position_current.still = 0;
this->vm->hop_channel++;
fprintf(MSG_OUT, "libdvdnav: previous chapter done\n");
@@ -275,14 +273,11 @@ dvdnav_status_t dvdnav_next_pg_search(dvdnav_t *this) {
return S_ERR;
pthread_mutex_lock(&this->vm_lock);
- /* Make sure this is not the last chapter */
- if(state->pgN >= state->pgc->nr_of_programs) {
- fprintf(MSG_OUT, "libdvdnav: at last chapter. jumping to end of last cell.\n");
- this->vm->state.cellN = this->vm->state.pgc->nr_of_cells;
- vm_get_next_cell(this->vm);
- } else {
- fprintf(MSG_OUT, "libdvdnav: next chapter\n");
- vm_jump_prog(this->vm, state->pgN + 1);
+ fprintf(MSG_OUT, "libdvdnav: next chapter\n");
+ if (!vm_next_pg(this->vm)) {
+ fprintf(MSG_OUT, "libdvdnav: next chapter failed.\n");
+ pthread_mutex_unlock(&this->vm_lock);
+ return S_ERR;
}
this->position_current.still = 0;
this->vm->hop_channel++;