[libbluray-devel] commit: TMP nv_timer (hpi1 )

git at videolan.org git at videolan.org
Tue Aug 17 01:53:55 CEST 2010


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Jul 30 16:18:41 2010 +0300| [00f1be6b8631160dcfe10b5373532bbd0f66d60c] | committer: hpi1 

TMP nv_timer

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=00f1be6b8631160dcfe10b5373532bbd0f66d60c
---

 src/libbluray/hdmv/hdmv_vm.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/libbluray/hdmv/hdmv_vm.c b/src/libbluray/hdmv/hdmv_vm.c
index 3398425..f3ccc99 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -263,6 +263,8 @@ static void _suspend_object(HDMV_VM *p)
 
 }
 
+static void _set_nv_timer(HDMV_VM *p, uint32_t dst, uint32_t src);
+
 static int _resume_object(HDMV_VM *p)
 {
     if (!p->suspended_object) {
@@ -275,6 +277,8 @@ static int _resume_object(HDMV_VM *p)
 
     bd_psr_restore_state(p->regs);
 
+    _set_nv_timer(p, 0, 0);
+
     DEBUG(DBG_HDMV, "resuming object %p at %d\n", p->object, p->pc + 1);
 
     p->suspended_object = NULL;
@@ -296,8 +300,7 @@ static int _jump_object(HDMV_VM *p, int object)
 
     DEBUG(DBG_HDMV, "_jump_object(): jumping to object %d\n", object);
 
-    p->pc     = 0;
-    p->object = &p->movie_objects->objects[object];
+    hdmv_vm_select_object(p, object, NULL);
 
     return 0;
 }
@@ -547,7 +550,7 @@ static void _set_nv_timer(HDMV_VM *p, uint32_t dst, uint32_t src)
     p->nv_timer.time.tv_sec = 0;
 
     bd_psr_write(p->regs, PSR_NAV_TIMER, 0);
-
+#warning move nav timer code to register.c/h... ? (not HDMV-specific)
     return;
   }
 
@@ -836,6 +839,8 @@ static int _hdmv_step(HDMV_VM *p)
 
 int hdmv_vm_select_object(HDMV_VM *p, int object, void *ig_object)
 {
+    _set_nv_timer(p, 0, 0);
+
     if (object >= 0) {
         if (object >= p->movie_objects->num_objects) {
             DEBUG(DBG_HDMV|DBG_CRIT, "hdmv_vm_select_program(): invalid object reference (%d) !\n", object);



More information about the libbluray-devel mailing list