av_malloc vs av_mallocz patch by (Kurosu <kurosu inforezo org>)

Originally committed as revision 3830 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Kurosu
2005-01-12 18:25:48 +00:00
committed by Michael Niedermayer
parent 83b074704b
commit f41c1fac3c
4 changed files with 2 additions and 5 deletions

View File

@@ -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);