[FFmpeg-cvslog] avformat/oggdec: favor av_freep() over av_free()
Michael Niedermayer
git at videolan.org
Sat Oct 19 23:01:25 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 19 22:50:16 2013 +0200| [6838e1f547d46ae8bad3303d6caf6b1fb9142c8e] | committer: Michael Niedermayer
avformat/oggdec: favor av_freep() over av_free()
Found-by: Reimar Döffinger
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6838e1f547d46ae8bad3303d6caf6b1fb9142c8e
---
libavformat/oggdec.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 9f8d665..a099eb3 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -99,7 +99,7 @@ static int ogg_restore(AVFormatContext *s, int discard)
if (!discard) {
for (i = 0; i < ogg->nstreams; i++)
- av_free(ogg->streams[i].buf);
+ av_freep(&ogg->streams[i].buf);
avio_seek(bc, ost->pos, SEEK_SET);
ogg->page_pos = -1;
@@ -633,14 +633,14 @@ static int ogg_read_close(AVFormatContext *s)
int i;
for (i = 0; i < ogg->nstreams; i++) {
- av_free(ogg->streams[i].buf);
+ av_freep(&ogg->streams[i].buf);
if (ogg->streams[i].codec &&
ogg->streams[i].codec->cleanup) {
ogg->streams[i].codec->cleanup(s, i);
}
- av_free(ogg->streams[i].private);
+ av_freep(&ogg->streams[i].private);
}
- av_free(ogg->streams);
+ av_freep(&ogg->streams);
return 0;
}
More information about the ffmpeg-cvslog
mailing list