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>2021-02-27 07:20:59 +0100
commit9b9fd0dd20cb7385b56d5d7d6cde9d44017bb380 (patch)
tree340cf96784b16a3ae7a1f69f36c94f9ede1619f7 /libavformat/dashdec.c
parent6b7172bcd43ee5d1e5acd8fd24e73201744a9340 (diff)
downloadffmpeg-9b9fd0dd20cb7385b56d5d7d6cde9d44017bb380.tar.gz
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> (cherry picked from commit 17963a6ad7e41312312b32a4ce590abb9805f799)
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 636ce4105d..dda95668bb 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);