[DVDnav-discuss] [PATCH] Fix for Unknown command type handling

Marcel Mol marcel at mesa.nl
Sat Aug 16 00:36:01 CEST 2014


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 at 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



More information about the DVDnav-discuss mailing list