Commit ca561ad3 authored by rtogni's avatar rtogni

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

not needed


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11065 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 36a40324
...@@ -494,7 +494,8 @@ static int rm_assemble_video_frame(AVFormatContext *s, RMContext *rm, AVPacket * ...@@ -494,7 +494,8 @@ static int rm_assemble_video_frame(AVFormatContext *s, RMContext *rm, AVPacket *
if((seq & 0x7F) == 1 || rm->curpic_num != pic_num){ if((seq & 0x7F) == 1 || rm->curpic_num != pic_num){
rm->slices = ((hdr & 0x3F) << 1) + 1; rm->slices = ((hdr & 0x3F) << 1) + 1;
rm->videobufsize = len2 + 8*rm->slices + 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); return AVERROR(ENOMEM);
rm->videobufpos = 8*rm->slices + 1; rm->videobufpos = 8*rm->slices + 1;
rm->cur_slice = 0; 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