Commit 5616daf9 authored by Frank Galligan's avatar Frank Galligan Committed by Gerrit Code Review
Browse files

Merge "Fix win64 warning."

parents b36829a0 a136b871
...@@ -973,7 +973,7 @@ static void check_sync_code(VP9_COMMON *cm, struct vp9_read_bit_buffer *rb) { ...@@ -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; VP9_COMMON *const cm = (VP9_COMMON *)data;
vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Truncated packet"); vpx_internal_error(&cm->error, VPX_CODEC_CORRUPT_FRAME, "Truncated packet");
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "vpx/vpx_integer.h" #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 { struct vp9_read_bit_buffer {
const uint8_t *bit_buffer; const uint8_t *bit_buffer;
...@@ -31,9 +31,9 @@ static size_t vp9_rb_bytes_read(struct vp9_read_bit_buffer *rb) { ...@@ -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) { static int vp9_rb_read_bit(struct vp9_read_bit_buffer *rb) {
const int off = rb->bit_offset; const size_t off = rb->bit_offset;
const int p = off / CHAR_BIT; const size_t p = off / CHAR_BIT;
const int q = CHAR_BIT - 1 - off % CHAR_BIT; const int q = CHAR_BIT - 1 - (int)off % CHAR_BIT;
if (rb->bit_buffer + p >= rb->bit_buffer_end) { if (rb->bit_buffer + p >= rb->bit_buffer_end) {
rb->error_handler(rb->error_handler_data, rb->bit_offset); rb->error_handler(rb->error_handler_data, rb->bit_offset);
return 0; 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