summaryrefslogtreecommitdiff
path: root/libavformat/rmdec.c
diff options
context:
space:
mode:
authorRoberto Togni <r_togni@tiscali.it>2007-11-19 20:28:11 +0000
committerRoberto Togni <r_togni@tiscali.it>2007-11-19 20:28:11 +0000
commit2b013568f9143a080c32722f0fd340b6c7aea843 (patch)
tree35ae77b981f1a894c3d9f1a1d565456435871905 /libavformat/rmdec.c
parent0dd954b1f088244606e84f3ef062a8932b5a7c48 (diff)
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
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r--libavformat/rmdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 4cc4a34df0..79623094d6 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -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;