diff options
author | Fabrice Bellard <fabrice@bellard.org> | 2002-05-18 23:11:09 +0000 |
---|---|---|
committer | Fabrice Bellard <fabrice@bellard.org> | 2002-05-18 23:11:09 +0000 |
commit | 1ea4f593658c8b161a0a725252058b49c16a6b29 (patch) | |
tree | 5bf96a2a7242b8a0c227a196a3368188a77f9d8e /libav/mpeg.c | |
parent | 065422677a17ddb3d84a3b85b5064eb7df7e2c8a (diff) | |
download | ffmpeg-1ea4f593658c8b161a0a725252058b49c16a6b29.tar.gz |
use av memory handling functions
Originally committed as revision 528 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libav/mpeg.c')
-rw-r--r-- | libav/mpeg.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libav/mpeg.c b/libav/mpeg.c index 6443b18bb3..f14ce0a2d2 100644 --- a/libav/mpeg.c +++ b/libav/mpeg.c @@ -155,10 +155,9 @@ static int mpeg_mux_init(AVFormatContext *ctx) AVStream *st; StreamInfo *stream; - s = malloc(sizeof(MpegMuxContext)); + s = av_mallocz(sizeof(MpegMuxContext)); if (!s) return -1; - memset(s, 0, sizeof(MpegMuxContext)); ctx->priv_data = s; s->packet_number = 0; @@ -251,9 +250,9 @@ static int mpeg_mux_init(AVFormatContext *ctx) return 0; fail: for(i=0;i<ctx->nb_streams;i++) { - free(ctx->streams[i]->priv_data); + av_free(ctx->streams[i]->priv_data); } - free(s); + av_free(s); return -ENOMEM; } @@ -873,7 +872,7 @@ static int mpeg_mux_check_packet(AVFormatContext *s, int *size) static int mpeg_mux_read_close(AVFormatContext *s) { MpegDemuxContext *m = s->priv_data; - free(m); + av_free(m); return 0; } |