aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-20 17:16:56 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-20 17:16:56 +0000
commitccafd47251a83cab01dcde42dc09db425c80e69a (patch)
treec78f4d865efd3ef0b43c8ebeccc1692abba0e3b0 /libavformat/utils.c
parent6919e54c00b750cd3d9d756258d3677df52f96a9 (diff)
downloadffmpeg-ccafd47251a83cab01dcde42dc09db425c80e69a.tar.gz
factorize read_header failure freeing code
Originally committed as revision 13837 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e8cd86bcbc..e2eb1b0c94 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -405,7 +405,16 @@ int av_open_input_stream(AVFormatContext **ic_ptr,
return 0;
fail:
if (ic) {
+ int i;
av_freep(&ic->priv_data);
+ for(i=0;i<ic->nb_streams;i++) {
+ AVStream *st = ic->streams[i];
+ if (st) {
+ av_free(st->priv_data);
+ av_free(st->codec->extradata);
+ }
+ av_free(st);
+ }
}
av_free(ic);
*ic_ptr = NULL;