diff dsicinav.c @ 5089:bff60ecc02f9 libavcodec

Use AV_xx throughout libavcodec
author ramiro
date Sat, 02 Jun 2007 01:41:07 +0000
parents f99e40a7155b
children c2ab2ac31edb
line wrap: on
line diff
--- a/dsicinav.c	Fri Jun 01 21:17:05 2007 +0000
+++ b/dsicinav.c	Sat Jun 02 01:41:07 2007 +0000
@@ -25,6 +25,7 @@
  */
 
 #include "avcodec.h"
+#include "bytestream.h"
 
 
 typedef enum CinVideoBitmapIndex {
@@ -206,7 +207,7 @@
     }
 
     palette_type = buf[0];
-    palette_colors_count = buf[1] | (buf[2] << 8);
+    palette_colors_count = AV_RL16(buf+1);
     bitmap_frame_type = buf[3];
     buf += 4;
 
@@ -215,13 +216,12 @@
     /* handle palette */
     if (palette_type == 0) {
         for (i = 0; i < palette_colors_count; ++i) {
-            cin->palette[i] = (buf[2] << 16) | (buf[1] << 8) | buf[0];
-            buf += 3;
+            cin->palette[i] = bytestream_get_le24(&buf);
             bitmap_frame_size -= 3;
         }
     } else {
         for (i = 0; i < palette_colors_count; ++i) {
-            cin->palette[buf[0]] = (buf[3] << 16) | (buf[2] << 8) | buf[1];
+            cin->palette[buf[0]] = AV_RL24(buf+1);
             buf += 4;
             bitmap_frame_size -= 4;
         }