[libbluray-devel] Don't increment the program counter after TERMINATE_PL

Noeri Huisman git at videolan.org
Sun Feb 21 17:55:08 CET 2016


libbluray | branch: master | Noeri Huisman <noeri at noeri.me> | Sat Feb 20 17:20:28 2016 +0100| [6f16e18bd09284db04a79d3bd001bb2c06c013fd] | committer: hpi1

Don't increment the program counter after TERMINATE_PL

_resume_from_play_pl() restores the stored pc and increments it by one. This function is also called via _play_stop() when a TERMINATE_PL instruction is executed. The program counter is than incremented once more, wrongly skipping an instruction.

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

 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 7c6ba37..b52b929 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -1058,7 +1058,7 @@ 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);              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;
                         default:



More information about the libbluray-devel mailing list