Commit ace40730 authored by Johann Koenig's avatar Johann Koenig Committed by Gerrit Code Review
Browse files

Merge "Use data size directly instead of recomputing."

parents 9c908301 a9936de3
......@@ -986,7 +986,8 @@ int vp8_decode_frame(VP8D_COMP *pbi)
VP8_COMMON *const pc = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
const unsigned char *data = pbi->fragments.ptrs[0];
const unsigned char *data_end = data + pbi->fragments.sizes[0];
const unsigned int data_sz = pbi->fragments.sizes[0];
const unsigned char *data_end = data + data_sz;
ptrdiff_t first_partition_length_in_bytes;
int i, j, k, l;
......@@ -1022,7 +1023,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
const unsigned char *clear = data;
if (pbi->decrypt_cb)
{
int n = (int)VPXMIN(sizeof(clear_buffer), data_end - data);
int n = (int)VPXMIN(sizeof(clear_buffer), data_sz);
pbi->decrypt_cb(pbi->decrypt_state, data, clear_buffer, n);
clear = clear_buffer;
}
......
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