Commit 0dce332b authored by diego's avatar diego

Replace sizeof(short) by the more robust sizeof(*s->pblocks[i]) in memset and

memcpy calls.  s->pblocks is the element actually being handled.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17404 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8d4ea46e
......@@ -281,7 +281,7 @@ void ff_xvmc_decode_mb(MpegEncContext *s)
if (s->flags & CODEC_FLAG_GRAY) {
if (s->mb_intra) { // intra frames are always full chroma blocks
for (i = 4; i < blocks_per_mb; i++) {
memset(s->pblocks[i], 0, sizeof(short)*64); // so we need to clear them
memset(s->pblocks[i], 0, sizeof(*s->pblocks[i])*64); // so we need to clear them
if (!render->unsigned_intra)
s->pblocks[i][0] = 1 << 10;
}
......@@ -309,7 +309,7 @@ void ff_xvmc_decode_mb(MpegEncContext *s)
// copy blocks only if the codec doesn't support pblocks reordering
if (s->avctx->xvmc_acceleration == 1) {
memcpy(&render->data_blocks[render->next_free_data_block_num*64],
s->pblocks[i], sizeof(short)*64);
s->pblocks[i], sizeof(*s->pblocks[i])*64);
}
render->next_free_data_block_num++;
}
......
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