Mercurial > libdvdnav.hg
changeset 158:66a615581b3f src
Tidy up a bit.
author | jcdutton |
---|---|
date | Sun, 06 Apr 2003 11:07:09 +0000 |
parents | 7094c8661c05 |
children | 25b0c4f881c3 |
files | navigation.c |
diffstat | 1 files changed, 13 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/navigation.c Sun Apr 06 10:59:28 2003 +0000 +++ b/navigation.c Sun Apr 06 11:07:09 2003 +0000 @@ -110,22 +110,24 @@ pthread_mutex_unlock(&this->vm_lock); return S_ERR; } - if (this->vm->state.domain != VTS_DOMAIN) { - if ( (this->vm->state.domain == VTSM_DOMAIN) - || (this->vm->state.domain == VMGM_DOMAIN) ) { - /* Get current Menu ID: into *part. */ - vm_get_current_menu(this->vm, part); + if ( (this->vm->state.domain == VTSM_DOMAIN) + || (this->vm->state.domain == VMGM_DOMAIN) ) { + /* Get current Menu ID: into *part. */ + vm_get_current_menu(this->vm, part); + if (part > -1) { + title = 0; pthread_mutex_unlock(&this->vm_lock); return S_OK; } - printerr("Not in VTS domain."); - pthread_mutex_unlock(&this->vm_lock); - return S_ERR; } - retval = vm_get_current_title_part(this->vm, title, part); + if (this->vm->state.domain == VTS_DOMAIN) { + retval = vm_get_current_title_part(this->vm, title, part); + pthread_mutex_unlock(&this->vm_lock); + return retval ? S_OK : S_ERR; + } + printerr("Not in a title or menu."); pthread_mutex_unlock(&this->vm_lock); - - return retval ? S_OK : S_ERR; + return S_ERR; } dvdnav_status_t dvdnav_title_play(dvdnav_t *this, int title) {