[libbluray-devel] commit: _jump_object(): use hdmv_vm_select_object(). (hpi1 )

git at videolan.org git at videolan.org
Fri Sep 10 13:52:34 CEST 2010


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Aug 19 15:31:15 2010 +0300| [84b06238113a47ac30d1b90f9b33af83ff49f465] | committer: hpi1 

_jump_object(): use hdmv_vm_select_object().
 - validate object ID
 - program should not change if object ID is invalid

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

 src/libbluray/hdmv/hdmv_vm.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/libbluray/hdmv/hdmv_vm.c b/src/libbluray/hdmv/hdmv_vm.c
index 856ade3..87106e3 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -311,8 +311,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);
 
     return 0;
 }
@@ -851,8 +850,6 @@ static int _hdmv_step(HDMV_VM *p)
 
 int hdmv_vm_select_object(HDMV_VM *p, int object)
 {
-    p->object = NULL;
-
     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