diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-08-02 10:34:18 +0200 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2015-08-02 10:34:18 +0200 |
commit | 988ddfea5e32226448e353766c8d9b610914e087 (patch) | |
tree | 8520c316f6e4219ed383e083e2788e66a3653056 /libavformat/asfdec_o.c | |
parent | cf1ccfffa4b72d6dc39ea8a04bc391a4ff268fb8 (diff) | |
parent | cd4d9df22738e6f147521ccb72c7930db6050914 (diff) | |
download | ffmpeg-988ddfea5e32226448e353766c8d9b610914e087.tar.gz |
Merge commit 'cd4d9df22738e6f147521ccb72c7930db6050914'
* commit 'cd4d9df22738e6f147521ccb72c7930db6050914':
asfdec: free AVDictionaries properly when closing the demuxer
Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavformat/asfdec_o.c')
-rw-r--r-- | libavformat/asfdec_o.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c index ab3c7fce07..283807ad2e 100644 --- a/libavformat/asfdec_o.c +++ b/libavformat/asfdec_o.c @@ -1453,10 +1453,12 @@ static int asf_read_close(AVFormatContext *s) ASFContext *asf = s->priv_data; int i; - for (i = 0; i < asf->nb_streams; i++) { - av_free_packet(&asf->asf_st[i]->pkt.avpkt); - av_freep(&asf->asf_st[i]); + for (i = 0; i < ASF_MAX_STREAMS; i++) { av_dict_free(&asf->asf_sd[i].asf_met); + if (i < asf->nb_streams) { + av_free_packet(&asf->asf_st[i]->pkt.avpkt); + av_freep(&asf->asf_st[i]); + } } asf->nb_streams = 0; |