[PATCH] Fix for Unknown command type handling
Some DVDs seem to use command type 7 for something. But it will hit the 'Unknown command' check, resulting in asser(0). I.e. DVD refuses to play. By removing the assert() call the DVD seems to play fine. This patch removes the assert and corrects the error message (it is a 'command type', not a 'command') Signed-off-by: Marcel Mol <marcel@mesa.nl> --- src/vm/decoder.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/vm/decoder.c b/src/vm/decoder.c index 1e16a9c..bb95562 100644 --- a/src/vm/decoder.c +++ b/src/vm/decoder.c @@ -570,9 +570,8 @@ static int32_t eval_command(uint8_t *bytes, registers_t* registers, link_t *retu if(res) res = -1; break; - default: /* Unknown command */ - fprintf(MSG_OUT, "libdvdnav: WARNING: Unknown Command=%x\n", vm_getbits(&command, 63, 3)); - assert(0); + default: /* Unknown command type */ + fprintf(MSG_OUT, "libdvdnav: WARNING: Unknown Command Type=%x\n", vm_getbits(&command, 63, 3)); } /* Check if there are bits not yet examined */ -- 1.9.3
Dear Marcel, thank you for the patch. Am Samstag, den 16.08.2014, 00:36 +0200 schrieb Marcel Mol:
Some DVDs seem to use command type 7 for something.
Could you please list one example of such a DVD?
But it will hit the 'Unknown command' check, resulting in asser(0).
asser*t*
I.e. DVD refuses to play.
By removing the assert() call the DVD seems to play fine. This patch removes the assert and corrects the error message (it is a 'command type', not a 'command')
Signed-off-by: Marcel Mol <marcel@mesa.nl> --- src/vm/decoder.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
[…] With the nitpicks above addressed this looks good. Thanks, Paul
Hi Paul, Thanks for your comments, I saw the typo to late to still correct it. It is not actually a DVD I have. A team-mate ran into this. He was trying to watch "Battlestar Galactica (1978) - 6". (I think it is a DVD that was copied to disk, if that matters). On Sun, Aug 17, 2014 at 08:46:42PM +0200, Paul Menzel wrote:
Dear Marcel,
thank you for the patch.
Am Samstag, den 16.08.2014, 00:36 +0200 schrieb Marcel Mol:
Some DVDs seem to use command type 7 for something.
Could you please list one example of such a DVD?
But it will hit the 'Unknown command' check, resulting in asser(0).
asser*t*
I.e. DVD refuses to play.
By removing the assert() call the DVD seems to play fine. This patch removes the assert and corrects the error message (it is a 'command type', not a 'command')
Signed-off-by: Marcel Mol <marcel@mesa.nl> --- src/vm/decoder.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
[…]
With the nitpicks above addressed this looks good.
Thanks,
Paul
-- ======-------- Marcel J.E. Mol MESA Consulting B.V. =======--------- ph. +31-(0)6-54724868 P.O. Box 112 =======--------- marcel@mesa.nl 2630 AC Nootdorp __==== www.mesa.nl ---____U_n_i_x______I_n_t_e_r_n_e_t____ The Netherlands ____ They couldn't think of a number, Linux user 1148 -- counter.li.org so they gave me a name! -- Rupert Hine -- www.ruperthine.com
participants (3)
-
Marcel J.E. Mol -
Marcel Mol -
Paul Menzel