summaryrefslogtreecommitdiff
path: root/libavformat/dashdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-19 01:04:32 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-09-21 04:31:30 +0200
commit17963a6ad7e41312312b32a4ce590abb9805f799 (patch)
tree6b5e8c043af18ad1e98ad05e7b61df2638585ef8 /libavformat/dashdec.c
parent01a4c3596942dad396834fea155173590687c59d (diff)
avformat/dashdec: Don't overwrite and leak old initialization fragments
Reviewed-by: Steven Liu <lq@chinaffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/dashdec.c')
-rw-r--r--libavformat/dashdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index d84da16dbd..3f51e079cf 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -614,6 +614,7 @@ static int parse_manifest_segmenturlnode(AVFormatContext *s, struct representati
initialization_val = xmlGetProp(fragmenturl_node, "sourceURL");
range_val = xmlGetProp(fragmenturl_node, "range");
if (initialization_val || range_val) {
+ free_fragment(&rep->init_section);
rep->init_section = get_Fragment(range_val);
if (!rep->init_section) {
xmlFree(initialization_val);