shithub: libvpx

Download patch

ref: 5616daf93e09246c92eb29670e16e837832c4096
parent: b36829a0dc8fd4f0132f46055c41fc2e01799238
parent: a136b87185d03f3d0c131b25eb93e2d4ae985b72
author: Frank Galligan <[email protected]>
date: Thu Jun 13 12:37:52 EDT 2013

Merge "Fix win64 warning."

--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -973,7 +973,7 @@
   }
 }
 
-static void error_handler(void *data, int bit_offset) {
+static void error_handler(void *data, size_t bit_offset) {
   VP9_COMMON *const cm = (VP9_COMMON *)data;
   vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Truncated packet");
 }
--- a/vp9/decoder/vp9_read_bit_buffer.h
+++ b/vp9/decoder/vp9_read_bit_buffer.h
@@ -15,7 +15,7 @@
 
 #include "vpx/vpx_integer.h"
 
-typedef void (*vp9_rb_error_handler)(void *data, int bit_offset);
+typedef void (*vp9_rb_error_handler)(void *data, size_t bit_offset);
 
 struct vp9_read_bit_buffer {
   const uint8_t *bit_buffer;
@@ -31,9 +31,9 @@
 }
 
 static int vp9_rb_read_bit(struct vp9_read_bit_buffer *rb) {
-  const int off = rb->bit_offset;
-  const int p = off / CHAR_BIT;
-  const int q = CHAR_BIT - 1 - off % CHAR_BIT;
+  const size_t off = rb->bit_offset;
+  const size_t p = off / CHAR_BIT;
+  const int q = CHAR_BIT - 1 - (int)off % CHAR_BIT;
   if (rb->bit_buffer + p >= rb->bit_buffer_end) {
     rb->error_handler(rb->error_handler_data, rb->bit_offset);
     return 0;