[libdvdnav-devel] Fix for Unknown command type handling

Marcel Mol git at videolan.org
Sat Aug 16 01:05:05 CEST 2014


libdvdnav | branch: master | Marcel Mol <marcel at mesa.nl> | Sat Aug 16 00:36:01 2014 +0200| [298139d90b5736afef4bef4c7f4ae6a895e57bde] | committer: Jean-Baptiste Kempf

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 at mesa.nl>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/libdvdnav.git/?a=commit;h=298139d90b5736afef4bef4c7f4ae6a895e57bde
---

 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 */
 



More information about the libdvdnav-devel mailing list