diff options
author | Thilo Borgmann <thilo.borgmann@googlemail.com> | 2012-10-14 17:38:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-14 20:37:43 +0200 |
commit | 41bf943f709e7327601f5aa02599fdcb3c1ca59d (patch) | |
tree | 54c0b8fb6291b7e1d4cb6ffddc19e95594a4424d /libavcodec | |
parent | 45bd0d15f453fbd52d5e47f34860ac32ca2a9b16 (diff) | |
download | ffmpeg-41bf943f709e7327601f5aa02599fdcb3c1ca59d.tar.gz |
bgmc: fix sizeof arguments (should fix CIDs: 700724 and 608084)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/bgmc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/bgmc.c b/libavcodec/bgmc.c index e4f937cac1..8b84ebfa95 100644 --- a/libavcodec/bgmc.c +++ b/libavcodec/bgmc.c @@ -458,8 +458,8 @@ static uint8_t *bgmc_lut_getp(uint8_t *lut, int *lut_status, int delta) /** Initialize the lookup table arrays */ 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); @@ -467,7 +467,7 @@ int ff_bgmc_init(AVCodecContext *avctx, uint8_t **cf_lut, int **cf_lut_status) 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; |