changeset 323:0fb9e6396a0d libavformat

off by 1 in the palette
author melanson
date Mon, 01 Dec 2003 13:59:08 +0000
parents e14ebc79e4bf
children 3ef8c842fe78
files ipmovie.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ipmovie.c	Sat Nov 29 00:21:33 2003 +0000
+++ b/ipmovie.c	Mon Dec 01 13:59:08 2003 +0000
@@ -452,7 +452,7 @@
 
             /* load the palette into internal data structure */
             first_color = LE_16(&scratch[0]);
-            last_color = first_color + LE_16(&scratch[2]);
+            last_color = first_color + LE_16(&scratch[2]) - 1;
             /* sanity check (since they are 16 bit values) */
             if ((first_color > 0xFF) || (last_color > 0xFF)) {
                 debug_ipmovie("demux_ipmovie: set_palette indices out of range (%d -> %d)\n",