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/ffm.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/ffm.c')
-rw-r--r-- | libav/ffm.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/libav/ffm.c b/libav/ffm.c index 98fde8345a..a9892a68a6 100644 --- a/libav/ffm.c +++ b/libav/ffm.c @@ -198,10 +198,9 @@ static int ffm_write_header(AVFormatContext *s) for(i=0;i<s->nb_streams;i++) { st = s->streams[i]; fst = st->priv_data; - if (fst) - free(fst); + av_free(fst); } - free(ffm); + av_free(ffm); return -1; } @@ -252,8 +251,8 @@ static int ffm_write_trailer(AVFormatContext *s) put_flush_packet(pb); for(i=0;i<s->nb_streams;i++) - free(s->streams[i]->priv_data); - free(ffm); + av_free(s->streams[i]->priv_data); + av_free(ffm); return 0; } @@ -433,13 +432,12 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) st = s->streams[i]; if (st) { fst = st->priv_data; - if (fst) - free(fst); - free(st); + av_free(fst); + av_free(st); } } if (ffm) - free(ffm); + av_free(ffm); return -1; } @@ -615,9 +613,9 @@ static int ffm_read_close(AVFormatContext *s) for(i=0;i<s->nb_streams;i++) { st = s->streams[i]; - free(st->priv_data); + av_free(st->priv_data); } - free(s->priv_data); + av_free(s->priv_data); return 0; } |