Commit b8c5832b authored by Imdad Sardharwalla's avatar Imdad Sardharwalla Committed by Wan-Teh Chang

Fix incorrect pointer arithmetic in obudec.c

This patch corrects an incorrect pointer arithmetic calculation
in obudec.c introduced in commit 4beef21b.

BUG=aomedia:1830

Change-Id: I6c96674e9fd21a1c00d84fdf71ae9fdb1d75b8c9
parent 2a6739f4
......@@ -394,10 +394,9 @@ int obudec_read_temporal_unit(struct ObuDecInputContext *obu_ctx,
if (!obu_ctx->is_annexb) {
memcpy(*buffer, obu_ctx->buffer, (size_t)tu_size);
// At this point, (obu_ctx->buffer + obu_ctx->bytes_buffered) points to the
// end of the buffer.
memmove(obu_ctx->buffer,
obu_ctx->buffer + obu_ctx->bytes_buffered - obu_size,
// At this point, (obu_ctx->buffer + obu_ctx->bytes_buffered + obu_size)
// points to the end of the buffer.
memmove(obu_ctx->buffer, obu_ctx->buffer + obu_ctx->bytes_buffered,
(size_t)obu_size);
obu_ctx->bytes_buffered = (size_t)obu_size;
} else {
......
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