OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90e648c
)
asfdec: free AVDictionaries properly when closing the demuxer
author
Alexandra Hájková
<alexandra.khirnova@gmail.com>
Thu, 30 Jul 2015 17:59:25 +0000
(19:59 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Fri, 31 Jul 2015 05:23:20 +0000
(07:23 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavformat/asfdec.c
patch
|
blob
|
history
diff --git
a/libavformat/asfdec.c
b/libavformat/asfdec.c
index
37d91e0
..
72c5916
100644
(file)
--- a/
libavformat/asfdec.c
+++ b/
libavformat/asfdec.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;