[DVDnav-discuss] Return an error in dvdnav_get_position instead of asserting
Jean-Baptiste Kempf
git at videolan.org
Sun Aug 31 00:52:16 CEST 2014
libdvdnav | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Aug 31 00:51:40 2014 +0200| [2d73a2b3c6ccd3d45be194d482cfb09f8e5055e2] | committer: Jean-Baptiste Kempf
Return an error in dvdnav_get_position instead of asserting
LP: #1236939
> http://git.videolan.org/gitweb.cgi/libdvdnav.git/?a=commit;h=2d73a2b3c6ccd3d45be194d482cfb09f8e5055e2
---
src/searching.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/searching.c b/src/searching.c
index f6e497e..74a16ee 100644
--- a/src/searching.c
+++ b/src/searching.c
@@ -563,7 +563,8 @@ dvdnav_status_t dvdnav_get_position(dvdnav_t *this, uint32_t *pos,
*len += cell->last_sector - cell->first_sector + 1;
}
- assert((signed)*pos != -1);
+ if((signed)*pos == -1)
+ return DVDNAV_STATUS_ERR;
pthread_mutex_unlock(&this->vm_lock);
More information about the DVDnav-discuss
mailing list