[FFmpeg-cvslog] bgmc: fix sizeof arguments
Thilo Borgmann
git at videolan.org
Sat Nov 15 01:54:35 CET 2014
ffmpeg | branch: master | Thilo Borgmann <thilo.borgmann at googlemail.com> | Wed Nov 12 19:10:43 2014 +0100| [e4cb6abb2f46910c72178e2f987a0198f0fd10b1] | committer: Vittorio Giovara
bgmc: fix sizeof arguments
CC: libav-devel at libav.org
Bug-Id: CID 608084 / CID 700724
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e4cb6abb2f46910c72178e2f987a0198f0fd10b1
---
libavcodec/bgmc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/bgmc.c b/libavcodec/bgmc.c
index c7f732e..ad8baae 100644
--- a/libavcodec/bgmc.c
+++ b/libavcodec/bgmc.c
@@ -460,8 +460,8 @@ static uint8_t *bgmc_lut_getp(uint8_t *lut, int *lut_status, int delta)
av_cold int ff_bgmc_init(AVCodecContext *avctx,
uint8_t **cf_lut, int **cf_lut_status)
{
- *cf_lut = av_malloc(sizeof(*cf_lut) * LUT_BUFF * 16 * LUT_SIZE);
- *cf_lut_status = av_malloc(sizeof(*cf_lut_status) * LUT_BUFF);
+ *cf_lut = av_malloc(sizeof(**cf_lut) * LUT_BUFF * 16 * LUT_SIZE);
+ *cf_lut_status = av_malloc(sizeof(**cf_lut_status) * LUT_BUFF);
if (!*cf_lut || !*cf_lut_status) {
ff_bgmc_end(cf_lut, cf_lut_status);
@@ -469,7 +469,7 @@ av_cold int ff_bgmc_init(AVCodecContext *avctx,
return AVERROR(ENOMEM);
} else {
// initialize lut_status buffer to a value never used to compare against
- memset(*cf_lut_status, -1, sizeof(*cf_lut_status) * LUT_BUFF);
+ memset(*cf_lut_status, -1, sizeof(**cf_lut_status) * LUT_BUFF);
}
return 0;
More information about the ffmpeg-cvslog
mailing list