diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-20 17:16:56 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-06-20 17:16:56 +0000 |
commit | ccafd47251a83cab01dcde42dc09db425c80e69a (patch) | |
tree | c78f4d865efd3ef0b43c8ebeccc1692abba0e3b0 /libavformat/utils.c | |
parent | 6919e54c00b750cd3d9d756258d3677df52f96a9 (diff) | |
download | ffmpeg-streaming-ccafd47251a83cab01dcde42dc09db425c80e69a.zip ffmpeg-streaming-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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index e8cd86b..e2eb1b0 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; |