If no representation bandwidth value is set, the url value returned by get_content_url is corrupt (as the memory has been freed).
This change ensures the url string is not freed unless it is about to be reused Signed-off-by: Brendan McGrath <red...@redmandi.dyndns.org> --- libavformat/dashdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 2492f1d..83980b9 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -482,9 +482,11 @@ static char *get_content_url(xmlNodePtr *baseurl_nodes, return NULL; } av_strlcpy(tmp_str, url, sizeof(tmp_str)); - av_free(url); } if (rep_bandwidth_val && tmp_str[0] != '\0') { + if (url) { + av_free(url); + } url = av_strireplace(tmp_str, "$Bandwidth$", (const char*)rep_bandwidth_val); if (!url) { return NULL; -- 2.7.4 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel