summaryrefslogtreecommitdiff
path: root/libav/rm.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2002-05-18 23:11:09 +0000
committerFabrice Bellard <fabrice@bellard.org>2002-05-18 23:11:09 +0000
commit1ea4f593658c8b161a0a725252058b49c16a6b29 (patch)
tree5bf96a2a7242b8a0c227a196a3368188a77f9d8e /libav/rm.c
parent065422677a17ddb3d84a3b85b5064eb7df7e2c8a (diff)
use av memory handling functions
Originally committed as revision 528 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav/rm.c')
-rw-r--r--libav/rm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libav/rm.c b/libav/rm.c
index 91e42a16b0..5608499979 100644
--- a/libav/rm.c
+++ b/libav/rm.c
@@ -286,7 +286,7 @@ static int rm_write_header(AVFormatContext *s)
int n;
AVCodecContext *codec;
- rm = malloc(sizeof(RMContext));
+ rm = av_malloc(sizeof(RMContext));
if (!rm)
return -1;
memset(rm, 0, sizeof(RMContext));
@@ -337,7 +337,7 @@ static int rm_write_audio(AVFormatContext *s, UINT8 *buf, int size)
int i;
/* XXX: suppress this malloc */
- buf1= (UINT8*) malloc( size * sizeof(UINT8) );
+ buf1= (UINT8*) av_malloc( size * sizeof(UINT8) );
write_packet_header(s, stream, size, stream->enc->key_frame);
@@ -349,7 +349,7 @@ static int rm_write_audio(AVFormatContext *s, UINT8 *buf, int size)
put_buffer(pb, buf1, size);
put_flush_packet(pb);
stream->nb_frames++;
- free(buf1);
+ av_free(buf1);
return 0;
}
@@ -439,7 +439,7 @@ static int rm_write_trailer(AVFormatContext *s)
}
put_flush_packet(pb);
- free(rm);
+ av_free(rm);
return 0;
}
@@ -638,7 +638,7 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap)
fail:
for(i=0;i<s->nb_streams;i++) {
- free(s->streams[i]);
+ av_free(s->streams[i]);
}
return -EIO;
}
@@ -707,7 +707,7 @@ static int rm_read_packet(AVFormatContext *s, AVPacket *pkt)
static int rm_read_close(AVFormatContext *s)
{
RMContext *rm = s->priv_data;
- free(rm);
+ av_free(rm);
return 0;
}