Commit 2b013568 authored by Roberto Togni's avatar Roberto Togni
Browse files

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
parent 0dd954b1
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment