summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_xvmc.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-02-17 23:51:28 +0000
committerDiego Biurrun <diego@biurrun.de>2009-02-17 23:51:28 +0000
commit7df33ec28e1cb8886c38239b41285af85ab02066 (patch)
treeabc58d3822817991a07b9de20aa97f4b1c16f226 /libavcodec/mpegvideo_xvmc.c
parent63864cb810e439cfdefa70befd5128e1a330794a (diff)
downloadffmpeg-7df33ec28e1cb8886c38239b41285af85ab02066.tar.gz
Replace sizeof(short) by the more robust sizeof(*s->pblocks[i]) in memset and
memcpy calls. s->pblocks is the element actually being handled. Originally committed as revision 17404 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo_xvmc.c')
-rw-r--r--libavcodec/mpegvideo_xvmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mpegvideo_xvmc.c b/libavcodec/mpegvideo_xvmc.c
index daf98f2736..1684abb860 100644
--- a/libavcodec/mpegvideo_xvmc.c
+++ b/libavcodec/mpegvideo_xvmc.c
@@ -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++;
}