[libbluray-devel] hdmv_vm_suspend_pl(): verify object is suspended because of playlist playback

hpi1 git at videolan.org
Sun May 1 15:38:07 CEST 2011


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun May  1 16:36:23 2011 +0300| [f32a041ecfcee619bc6bb944c97a60898415202a] | committer: hpi1

hdmv_vm_suspend_pl(): verify object is suspended because of playlist playback

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

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

diff --git a/src/libbluray/hdmv/hdmv_vm.c b/src/libbluray/hdmv/hdmv_vm.c
index bda4e16..9e94337 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -278,6 +278,22 @@ void hdmv_vm_free(HDMV_VM **p)
  * suspend/resume ("function call")
  */
 
+static int _suspended_at_play_pl(HDMV_VM *p)
+{
+    int play_pl = 0;
+    if (p && p->suspended_object) {
+        MOBJ_CMD  *cmd  = &p->suspended_object->cmds[p->suspended_pc];
+        HDMV_INSN *insn = &cmd->insn;
+        play_pl = (insn->grp     == INSN_GROUP_BRANCH &&
+                   insn->sub_grp == BRANCH_PLAY  &&
+                   (  insn->branch_opt == INSN_PLAY_PL ||
+                      insn->branch_opt == INSN_PLAY_PL_PI ||
+                      insn->branch_opt == INSN_PLAY_PL_PM));
+    }
+
+    return play_pl;
+}
+
 static void _suspend_object(HDMV_VM *p, int psr_backup)
 {
     BD_DEBUG(DBG_HDMV, "_suspend_object()\n");
@@ -985,6 +1001,9 @@ int hdmv_vm_suspend_pl(HDMV_VM *p)
     } else if (!p->suspended_object) {
         BD_DEBUG(DBG_HDMV, "hdmv_vm_suspend_pl(): No suspended object\n");
 
+    } else if (!_suspended_at_play_pl(p)) {
+        BD_DEBUG(DBG_HDMV, "hdmv_vm_suspend_pl(): Object is not playing playlist\n");
+
     } else if (!p->suspended_object->resume_intention_flag) {
         BD_DEBUG(DBG_HDMV, "hdmv_vm_suspend_pl(): no resume intention flag\n");
 



More information about the libbluray-devel mailing list