diff rmdec.c @ 2770:a7e42cf4b364 libavformat

Replace realloc with free+malloc, the previous content of the buffer is not needed
author rtogni
date Mon, 19 Nov 2007 20:28:11 +0000
parents 1d31f550e6d7
children d52c718e83f9
line wrap: on
line diff
--- a/rmdec.c	Mon Nov 19 10:33:05 2007 +0000
+++ b/rmdec.c	Mon Nov 19 20:28:11 2007 +0000
@@ -494,7 +494,8 @@
     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;