Commit a136b871 authored by Frank Galligan's avatar Frank Galligan
Browse files

Fix win64 warning.

- size_t is 64bits in win64. int is 32 bits.

Change-Id: I4e756427ad42c841098a01a216469f65313987e7
parent a81bd12a
......@@ -973,7 +973,7 @@ static void check_sync_code(VP9_COMMON *cm, struct vp9_read_bit_buffer *rb) {
}
}
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");
}
......
......@@ -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 size_t vp9_rb_bytes_read(struct vp9_read_bit_buffer *rb) {
}
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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment