History

avformat/dashdec: Don't allocate and leak strings that are never used

Since commit e134c203 strdups of several elements of a manifest are kept in the DASHContext; but said commit completely forgot to free these strings again (with xmlFree()). Given that these strings are never used at all, this commit closes this leak by reverting said commit. This reverts commit e134c20374ee3cbc6d04885d306b02c9871683a2.

Andreas Rheinhardt committed 6 years ago

Commit 3c138e51 parent 3cb099e1 file · +0 −27Browse files

Unified · Split

libavformat/dashdec.c+0−27
@@ -122,19 +122,6 @@ struct representation { · 121 unmodified lines
122122 typedef struct DASHContext {
123123 const AVClass *class;
124124 char *base_url;
125− char *adaptionset_contenttype_val;
126− char *adaptionset_par_val;
127− char *adaptionset_lang_val;
128− char *adaptionset_minbw_val;
129− char *adaptionset_maxbw_val;
130− char *adaptionset_minwidth_val;
131− char *adaptionset_maxwidth_val;
132− char *adaptionset_minheight_val;
133− char *adaptionset_maxheight_val;
134− char *adaptionset_minframerate_val;
135− char *adaptionset_maxframerate_val;
136− char *adaptionset_segmentalignment_val;
137− char *adaptionset_bitstreamswitching_val;
138125
139126 int n_videos;
140127 struct representation **videos;
@@ -1124,26 +1111,12 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url, · 983 unmodified lines
11241111 xmlNodePtr period_segmentlist_node)
11251112 {
11261113 int ret = 0;
1127− DASHContext *c = s->priv_data;
11281114 xmlNodePtr fragment_template_node = NULL;
11291115 xmlNodePtr content_component_node = NULL;
11301116 xmlNodePtr adaptionset_baseurl_node = NULL;
11311117 xmlNodePtr adaptionset_segmentlist_node = NULL;
11321118 xmlNodePtr adaptionset_supplementalproperty_node = NULL;
11331119 xmlNodePtr node = NULL;
1134− c->adaptionset_contenttype_val = xmlGetProp(adaptionset_node, "contentType");
1135− c->adaptionset_par_val = xmlGetProp(adaptionset_node, "par");
1136− c->adaptionset_lang_val = xmlGetProp(adaptionset_node, "lang");
1137− c->adaptionset_minbw_val = xmlGetProp(adaptionset_node, "minBandwidth");
1138− c->adaptionset_maxbw_val = xmlGetProp(adaptionset_node, "maxBandwidth");
1139− c->adaptionset_minwidth_val = xmlGetProp(adaptionset_node, "minWidth");
1140− c->adaptionset_maxwidth_val = xmlGetProp(adaptionset_node, "maxWidth");
1141− c->adaptionset_minheight_val = xmlGetProp(adaptionset_node, "minHeight");
1142− c->adaptionset_maxheight_val = xmlGetProp(adaptionset_node, "maxHeight");
1143− c->adaptionset_minframerate_val = xmlGetProp(adaptionset_node, "minFrameRate");
1144− c->adaptionset_maxframerate_val = xmlGetProp(adaptionset_node, "maxFrameRate");
1145− c->adaptionset_segmentalignment_val = xmlGetProp(adaptionset_node, "segmentAlignment");
1146− c->adaptionset_bitstreamswitching_val = xmlGetProp(adaptionset_node, "bitstreamSwitching");
11471120
11481121 node = xmlFirstElementChild(adaptionset_node);
11491122 while (node) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t