]> git.sesse.net Git - ffmpeg/commitdiff
libavformat/dashdec: Fix issue with dash on Windows
authorChristopher Degawa <ccom@randomderp.com>
Thu, 8 Oct 2020 12:45:21 +0000 (12:45 +0000)
committerJames Almer <jamrial@gmail.com>
Thu, 8 Oct 2020 13:05:09 +0000 (10:05 -0300)
Use xmlFree instead of av_freep

snip from libxml2:

 * xmlGetProp:
...
 * Returns the attribute value or NULL if not found.
 *     It's up to the caller to free the memory with xmlFree().

According to libxml2, you are supposed to use xmlFree instead of free
on the pointer returned by it, and also using av_freep on Windows will
call _aligned_free instead of normal free, causing _aligned_free to raise
SIGTRAP and crashing ffmpeg and ffplay.

Signed-off-by: Christopher Degawa <ccom@randomderp.com>
libavformat/dashdec.c

index 99b9c45439cee7120a2072f2a9212cbc37aa7602..42ea74635b457b5ea2b96bbcfe61f6e624509c31 100644 (file)
@@ -1145,7 +1145,7 @@ static int parse_manifest_adaptationset(AVFormatContext *s, const char *url,
     }
 
 err:
-    av_freep(&c->adaptionset_lang);
+    xmlFree(c->adaptionset_lang);
     return ret;
 }