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/img.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/img.c')
-rw-r--r-- | libav/img.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libav/img.c b/libav/img.c index 57cc0c303a..3ac8b52bfc 100644 --- a/libav/img.c +++ b/libav/img.c @@ -255,7 +255,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) ByteIOContext pb1, *f = &pb1; AVStream *st; - s = malloc(sizeof(VideoData)); + s = av_malloc(sizeof(VideoData)); if (!s) return -ENOMEM; @@ -264,7 +264,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) s1->nb_streams = 1; st = av_mallocz(sizeof(AVStream)); if (!st) { - free(s); + av_free(s); return -ENOMEM; } s1->streams[0] = st; @@ -372,14 +372,14 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) if (!s->is_pipe) url_fclose(f); fail: - free(s); + av_free(s); return -EIO; } static int img_read_close(AVFormatContext *s1) { VideoData *s = s1->priv_data; - free(s); + av_free(s); return 0; } @@ -510,7 +510,7 @@ static int img_write_header(AVFormatContext *s) } return 0; fail: - free(img); + av_free(img); return -EIO; } @@ -591,7 +591,7 @@ static int img_write_packet(AVFormatContext *s, int stream_index, static int img_write_trailer(AVFormatContext *s) { VideoData *img = s->priv_data; - free(img); + av_free(img); return 0; } |