[FFmpeg-cvslog] r11065 - trunk/libavformat/rmdec.c
rtogni
subversion
Mon Nov 19 21:28:12 CET 2007
Author: rtogni
Date: Mon Nov 19 21:28:11 2007
New Revision: 11065
Log:
Replace realloc with free+malloc, the previous content of the buffer is
not needed
Modified:
trunk/libavformat/rmdec.c
Modified: trunk/libavformat/rmdec.c
==============================================================================
--- trunk/libavformat/rmdec.c (original)
+++ trunk/libavformat/rmdec.c Mon Nov 19 21:28:11 2007
@@ -494,7 +494,8 @@ static int rm_assemble_video_frame(AVFor
if((seq & 0x7F) == 1 || rm->curpic_num != pic_num){
rm->slices = ((hdr & 0x3F) << 1) + 1;
rm->videobufsize = len2 + 8*rm->slices + 1;
- if(!(rm->videobuf = av_realloc(rm->videobuf, rm->videobufsize)))
+ av_free(rm->videobuf);
+ if(!(rm->videobuf = av_malloc(rm->videobufsize)))
return AVERROR(ENOMEM);
rm->videobufpos = 8*rm->slices + 1;
rm->cur_slice = 0;
More information about the ffmpeg-cvslog
mailing list