diff options
author | Kurosu <kurosu@inforezo.org> | 2005-01-12 18:25:48 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-01-12 18:25:48 +0000 |
commit | f41c1fac3c3e5bfcc9f6d5380aa228aa85a60562 (patch) | |
tree | 0c2a59b311c98a4b56e77ab13d6a27f4195b7b22 | |
parent | 83b074704b90e4373bec74102a9f3ab8a960b26d (diff) | |
download | ffmpeg-f41c1fac3c3e5bfcc9f6d5380aa228aa85a60562.tar.gz |
av_malloc vs av_mallocz patch by (Kurosu <kurosu inforezo org>)
Originally committed as revision 3830 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/asv1.c | 2 | ||||
-rw-r--r-- | libavcodec/mpegvideo.c | 1 | ||||
-rw-r--r-- | libavcodec/resample2.c | 2 | ||||
-rw-r--r-- | libavcodec/utils.c | 2 |
4 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c index 1a6b4a82d4..95b15337bf 100644 --- a/libavcodec/asv1.c +++ b/libavcodec/asv1.c @@ -579,7 +579,7 @@ static int decode_init(AVCodecContext *avctx){ } p->qstride= a->mb_width; - p->qscale_table= av_mallocz( p->qstride * a->mb_height); + p->qscale_table= av_malloc( p->qstride * a->mb_height); p->quality= (32*scale + a->inv_qscale/2)/a->inv_qscale; memset(p->qscale_table, p->quality, p->qstride*a->mb_height); diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index ffb7e0f854..b39d4ed5fb 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -594,7 +594,6 @@ static void MPV_encode_defaults(MpegEncContext *s){ done=1; default_mv_penalty= av_mallocz( sizeof(uint8_t)*(MAX_FCODE+1)*(2*MAX_MV+1) ); - memset(default_mv_penalty, 0, sizeof(uint8_t)*(MAX_FCODE+1)*(2*MAX_MV+1)); memset(default_fcode_tab , 0, sizeof(uint8_t)*(2*MAX_MV+1)); for(i=-16; i<16; i++){ diff --git a/libavcodec/resample2.c b/libavcodec/resample2.c index 0a9e44ef02..adda84435d 100644 --- a/libavcodec/resample2.c +++ b/libavcodec/resample2.c @@ -135,8 +135,6 @@ AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_size, double factor= FFMIN(out_rate * cutoff / in_rate, 1.0); int phase_count= 1<<phase_shift; - memset(c, 0, sizeof(AVResampleContext)); - c->phase_shift= phase_shift; c->phase_mask= phase_count-1; c->linear= linear; diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d1b3ca3c94..c51efd110f 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -314,7 +314,7 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic){ //FIXME next ensures that linesize= 2^x uvlinesize, thats needed because some MC code assumes it buf->linesize[i]= ALIGN(pixel_size*w>>h_shift, STRIDE_ALIGN<<(h_chroma_shift-h_shift)); - buf->base[i]= av_mallocz((buf->linesize[i]*h>>v_shift)+16); //FIXME 16 + buf->base[i]= av_malloc((buf->linesize[i]*h>>v_shift)+16); //FIXME 16 if(buf->base[i]==NULL) return -1; memset(buf->base[i], 128, buf->linesize[i]*h>>v_shift); |