Måns Rullgård <[email protected]> writes: F> İsmail Dönmez <[email protected]> writes: > >> --- >> libavcodec/cook.c | 2 +- >> libavcodec/imc.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) > > The comment sucks. Something like this would be better: > > Fix size argument of memset() > > Either fold this with the previous patch, or split them per codec and > prefix the commit message accordingly. > >> diff --git a/libavcodec/cook.c b/libavcodec/cook.c >> index 84211a6..e49750b 100644 >> --- a/libavcodec/cook.c >> +++ b/libavcodec/cook.c >> @@ -811,7 +811,7 @@ static void joint_decode(COOKContext *q, COOKSubpacket >> *p, float* mlt_buffer1, >> const float* cplscale; >> >> memset(decouple_tab, 0, sizeof(decouple_tab)); >> - memset(decode_buffer, 0, sizeof(decode_buffer)); >> + memset(decode_buffer, 0, sizeof(*decode_buffer)); >> >> /* Make sure the buffers are zeroed out. */ >> memset(mlt_buffer1,0, 1024*sizeof(float)); >> diff --git a/libavcodec/imc.c b/libavcodec/imc.c >> index 07d6cad..7fc5076 100644 >> --- a/libavcodec/imc.c >> +++ b/libavcodec/imc.c >> @@ -687,7 +687,7 @@ static int imc_decode_frame(AVCodecContext * avctx, >> q->decoder_reset = 1; >> >> if(q->decoder_reset) { >> - memset(q->out_samples, 0, sizeof(q->out_samples)); >> + memset(q->out_samples, 0, sizeof(*(q->out_samples))); > > Drop the inner () please. > >> for(i = 0; i < BANDS; i++)q->old_floor[i] = 1.0; >> for(i = 0; i < COEFFS; i++)q->CWdecoded[i] = 0; >> q->decoder_reset = 0; >> -- > > Looks OK otherwise.
Eh, I must be drunk... those are missing some multiplier. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
