[libbluray-devel] HDMV: fix infinite loop
hpi1
git at videolan.org
Mon Mar 21 11:03:42 CET 2016
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Feb 26 23:04:48 2016 +0200| [5ba2ba67aee21b6c122e7cbb0f3f3acea0ab0de9] | committer: hpi1
HDMV: fix infinite loop
If PLAY_STOP instruction is used in movie object,
it should be ignored (NOP). There's no object to resume.
Technically, it is incorrect to use PLAY_STOP in movie object
(playlist can't be playing while movie object is executed).
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=5ba2ba67aee21b6c122e7cbb0f3f3acea0ab0de9
---
src/libbluray/hdmv/hdmv_vm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libbluray/hdmv/hdmv_vm.c b/src/libbluray/hdmv/hdmv_vm.c
index b52b929..617d521 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -1058,9 +1058,9 @@ static int _hdmv_step(HDMV_VM *p)
case INSN_PLAY_PL: _play_at(p, dst, -1, -1); break;
case INSN_PLAY_PL_PI: _play_at(p, dst, src, -1); break;
case INSN_PLAY_PL_PM: _play_at(p, dst, -1, src); break;
- case INSN_TERMINATE_PL: _play_stop(p); inc_pc = 0; break;
case INSN_LINK_PI: _play_at(p, -1, dst, -1); break;
case INSN_LINK_MK: _play_at(p, -1, -1, dst); break;
+ case INSN_TERMINATE_PL: if (!_play_stop(p)) { inc_pc = 0; } break;
default:
BD_DEBUG(DBG_HDMV|DBG_CRIT, "unknown BRANCH/PLAY option %d in opcode 0x%08x\n",
insn->branch_opt, *(uint32_t*)insn);
More information about the libbluray-devel
mailing list