Scripting bug
Martin Hilpert <[email protected]> Mon, 06 Oct 2014 19:14:36 +0200
| Newsgroups | gmane.comp.multimedia.dvdauthor.user |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============0849327120815839983==
Content-Type: multipart/alternative;
boundary="------------080906080000020402020707"
This is a multi-part message in MIME format.
--------------080906080000020402020707
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
There is a serious scripting bug in DVDAuthor, version 0.7.1.
A conditional jump to a menu like the following will not be assembled
correctly:
<!--************** MENU 1 **************-->
...
<pre >g4=1; if(g3!=0){ g4=2; jump menu 2;} button=g4*1024; </pre>
When g3 is not zero, there is no jump to menu 2, instead button 2 of
menu 1 will be highlighted.
Opening the ifo-file with the tool *IfoEdit*, you see why:
1.Pre Command Set GPreg<4> mov (set-val)<1>
2.Pre Command If GPreg<3> != (cmp-val)<0> then Set GPreg<4> mov (set-val)<2>
3.Pre Command Set GPreg<13> mov GPreg<4>
4.Pre Command Set GPreg<13> mul (set-val)<1024>
5.Pre Command (SetHL_BTNN) Set Button Nr: GPreg<13>
1.Post Command Exit
there is no jump ( LinkPGCN ) command !!!!
You can bypass the bug inserting a second (dummy) command:
<pre >g4=1; if(g3!=0){ g4=2; g4=2; jump menu 2;} button=g4*1024; </pre>
one gets:
1.Pre Command Set GPreg<4> mov (set-val)<1>
2.Pre Command If GPreg<3> == (cmp-val)<0><' then Goto line# 5
3.Pre Command Set GPreg<4> mov (set-val)<2>
4.Pre Command Set GPreg<4> mov (set-val)<2>(LinkPGCN) Link PGC 2
5.Pre Command Set GPreg<13> mov GPreg<4>
6.Pre Command Set GPreg<13> mul (set-val)<1024>
7.Pre Command (SetHL_BTNN) Set Button Nr: GPreg<13>
1.Post Command Exit
You also can write:
<pre >g4=1; if(g3!=0){ g4=2+0; jump menu 2;} button=g4*1024; </pre>
because g4=2+0; is not a single command.
If the statement has an /else/ part, it is parsed correctly. So it will
also be ok/,/ to write :
<pre >g4=1; if(g3!=0){ g4=2; jump menu 2;} else button=g4*1024; </pre>
Similar commands : if( /condition/ ){ /single command/; jump /Target/;}
where /Target /is : "vmgm menu 1" or "title 1 chapter 2" seem to work
correctly.
For reference the complete XML-file:
=====================================================================
<?xml version="1.0" encoding="utf-8"?>
<dvdauthor jumppad="0">
<vmgm>
<menus>
<video format="pal" aspect="16:9" widescreen="nopanscan"/>
<audio lang="DE"/>
<subpicture lang="DE">
<stream id="0" mode="widescreen"/>
<stream id="1" mode="letterbox"/>
</subpicture>
<!--************** MENU 1 **************-->
<pgc entry="title">
<button name="button01">g3=0;jump titleset 1 menu;</button>
<button name="button02">g3=1;jump titleset 1 menu;</button>
<vob file="C:\dvd\tmp\dvd-tmp\menu0-0.mpg" pause="inf"/>
</pgc>
</menus>
</vmgm>
<titleset>
<menus>
<video format="pal" aspect="16:9" widescreen="nopanscan"/>
<audio lang="DE"/>
<subpicture lang="DE">
<stream id="0" mode="widescreen"/>
<stream id="1" mode="letterbox"/>
</subpicture>
<!--************** MENU 1 **************-->
<pgc entry="root">
<button name="button01">jump title 1;</button>
<button name="button02">jump vmgm menu 1;</button>
<vob file="C:\dvd\tmp\dvd-tmp\menu1-0.mpg" pause="inf"/>
<pre>g4=1; if(g3!=0){g4=2; jump menu 2;} button=g4*1024;</pre>
</pgc>
<!--************** MENU 2 **************-->
<pgc entry="ptt">
<button name="button01">jump title 1;</button>
<button name="button02">jump title 1 chapter 2;</button>
<vob file="C:\dvd\tmp\dvd-tmp\menu1-1.mpg" pause="inf"/>
<pre>button=g4*1024;</pre>
</pgc>
</menus>
<titles>
<video aspect="16:9" widescreen="nopanscan"/>
<audio lang="DE"/>
<!--************** TITLE 1 **************-->
<pgc>
<vob file="C:\dvd\tmp\dvd-cache\entry001.vob"
chapters="0:00,0:06"/>
<post>call menu;</post>
</pgc>
</titles>
</titleset>
</dvdauthor>
--------------080906080000020402020707
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-forward-container"><br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-15">
There is a serious scripting bug in DVDAuthor, version 0.7.1. <br>
A conditional jump to a menu like the following will not be
assembled correctly:<br>
<pre> <!--************** MENU 1 **************--></pre>
<pre> ...</pre>
<pre> <pre >g4=1; if(g3!=0){ g4=2; jump menu 2;} button=g4*1024; </pre></pre>
<br>
When g3 is not zero, there is no jump to menu 2, instead button 2
of menu 1 will be highlighted. <br>
Opening the ifo-file with the tool <b>IfoEdit</b>, you see why:<br>
<pre> 1.Pre Command Set GPreg<4> mov (set-val)<1> </pre>
<pre> 2.Pre Command If GPreg<3> != (cmp-val)<0> then Set GPreg<4> mov (set-val)<2> </pre>
<pre> 3.Pre Command Set GPreg<13> mov GPreg<4> </pre>
<pre> 4.Pre Command Set GPreg<13> mul (set-val)<1024> </pre>
<pre> 5.Pre Command (SetHL_BTNN) Set Button Nr: GPreg<13> </pre>
<pre> 1.Post Command Exit </pre>
there is no jump ( LinkPGCN ) command !!!!<br>
<br>
You can bypass the bug inserting a second (dummy) command:<br>
<pre> <pre >g4=1; if(g3!=0){ g4=2; g4=2; jump menu 2;} button=g4*1024; </pre></pre>
one gets:<br>
<pre> 1.Pre Command Set GPreg<4> mov (set-val)<1> </pre>
<pre> 2.Pre Command If GPreg<3> == (cmp-val)<0><' then Goto line# 5 </pre>
<pre> 3.Pre Command Set GPreg<4> mov (set-val)<2> </pre>
<pre> 4.Pre Command Set GPreg<4> mov (set-val)<2>(LinkPGCN) Link PGC 2 </pre>
<pre> 5.Pre Command Set GPreg<13> mov GPreg<4> </pre>
<pre> 6.Pre Command Set GPreg<13> mul (set-val)<1024> </pre>
<pre> 7.Pre Command (SetHL_BTNN) Set Button Nr: GPreg<13> </pre>
<pre> 1.Post Command Exit </pre>
You also can write:<br>
<pre> <pre >g4=1; if(g3!=0){ g4=2+0; jump menu 2;} button=g4*1024; </pre></pre>
because g4=2+0; is not a single command. <br>
If the statement has an <i>else</i> part, it is parsed correctly.
So it will also be ok<i>,</i> to write :<br>
<pre> <pre >g4=1; if(g3!=0){ g4=2; jump menu 2;} else button=g4*1024; </pre></pre>
<br>
Similar commands : if( <i>condition</i> ){ <i>single command</i>;
jump <i>Target</i>;}<br>
where <i>Target </i>is : "vmgm menu 1" or "title 1 chapter 2"
seem to work correctly.<br>
<br>
For reference the complete XML-file:<br>
=====================================================================<br>
<tt><?xml version="1.0" encoding="utf-8"?></tt><tt><br>
</tt><tt><dvdauthor jumppad="0"></tt><tt><br>
</tt><tt> <vmgm></tt><tt><br>
</tt><tt> <menus></tt><tt><br>
</tt><tt> <video format="pal" aspect="16:9"
widescreen="nopanscan"/></tt><tt><br>
</tt><tt> <audio lang="DE"/></tt><tt><br>
</tt><tt> <subpicture lang="DE"></tt><tt><br>
</tt><tt> <stream id="0" mode="widescreen"/></tt><tt><br>
</tt><tt> <stream id="1" mode="letterbox"/></tt><tt><br>
</tt><tt> </subpicture></tt><tt><br>
</tt><tt> <!--************** MENU 1 **************--></tt><tt><br>
</tt><tt> <pgc entry="title"></tt><tt><br>
</tt><tt> <button name="button01">g3=0;jump titleset
1 menu;</button></tt><tt><br>
</tt><tt> <button name="button02">g3=1;jump titleset
1 menu;</button></tt><tt><br>
</tt><tt> <vob file="C:\dvd\tmp\dvd-tmp\menu0-0.mpg"
pause="inf"/></tt><tt><br>
</tt><tt> </pgc></tt><tt><br>
</tt><tt> </menus></tt><tt><br>
</tt><tt> </vmgm></tt><tt><br>
</tt><tt> <titleset></tt><tt><br>
</tt><tt> <menus></tt><tt><br>
</tt><tt> <video format="pal" aspect="16:9"
widescreen="nopanscan"/></tt><tt><br>
</tt><tt> <audio lang="DE"/></tt><tt><br>
</tt><tt> <subpicture lang="DE"></tt><tt><br>
</tt><tt> <stream id="0" mode="widescreen"/></tt><tt><br>
</tt><tt> <stream id="1" mode="letterbox"/></tt><tt><br>
</tt><tt> </subpicture></tt><tt><br>
</tt><tt> <!--************** MENU 1 **************--></tt><tt><br>
</tt><tt> <pgc entry="root"></tt><tt><br>
</tt><tt> <button name="button01">jump title
1;</button></tt><tt><br>
</tt><tt> <button name="button02">jump vmgm menu
1;</button></tt><tt><br>
</tt><tt> <vob file="C:\dvd\tmp\dvd-tmp\menu1-0.mpg"
pause="inf"/></tt><tt><br>
</tt><tt> <pre>g4=1; if(g3!=0){g4=2; jump menu 2;}
button=g4*1024;</pre></tt><tt><br>
</tt><tt> </pgc></tt><tt><br>
</tt><tt> <!--************** MENU 2 **************--></tt><tt><br>
</tt><tt> <pgc entry="ptt"></tt><tt><br>
</tt><tt> <button name="button01">jump title
1;</button></tt><tt><br>
</tt><tt> <button name="button02">jump title 1
chapter 2;</button></tt><tt><br>
</tt><tt> <vob file="C:\dvd\tmp\dvd-tmp\menu1-1.mpg"
pause="inf"/></tt><tt><br>
</tt><tt> <pre>button=g4*1024;</pre></tt><tt><br>
</tt><tt> </pgc></tt><tt><br>
</tt><tt> </menus></tt><tt><br>
</tt><tt> <titles></tt><tt><br>
</tt><tt> <video aspect="16:9" widescreen="nopanscan"/></tt><tt><br>
</tt><tt> <audio lang="DE"/></tt><tt><br>
</tt><tt> <!--************** TITLE 1 **************--></tt><tt><br>
</tt><tt> <pgc></tt><tt><br>
</tt><tt> <vob file="C:\dvd\tmp\dvd-cache\entry001.vob"
chapters="0:00,0:06"/></tt><tt><br>
</tt><tt> <post>call menu;</post></tt><tt><br>
</tt><tt> </pgc></tt><tt><br>
</tt><tt> </titles></tt><tt><br>
</tt><tt> </titleset></tt><tt><br>
</tt><tt></dvdauthor></tt><tt><br>
</tt> <br>
</div>
<br>
</body>
</html>
--------------080906080000020402020707--
--===============0849327120815839983==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Slashdot TV. Videos for Nerds. Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
--===============0849327120815839983==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Dvdauthor-users mailing list
Dvdauthor-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/dvdauthor-users
--===============0849327120815839983==--