1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Replace realloc with free+malloc, the previous content of the buffer is

not needed

Originally committed as revision 11065 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Roberto Togni 2007-11-19 20:28:11 +00:00
parent 0dd954b1f0
commit 2b013568f9

View File

@ -494,7 +494,8 @@ static int rm_assemble_video_frame(AVFormatContext *s, RMContext *rm, AVPacket *
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;