avformat/hlsenc: Fix memleaks with repeating parameters
When a parameter like e.g. language is contained more than once in the part of var_stream_map pertaining to a single VariantStream, the later one just overwrites the pointer to the earlier one, leading to a memleak. This commit changes this by handling the situation gracefully: The earlier string is silently freed first, so that the last one wins. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Steven Liu <lq@onvideo.cn>
Showing
Please
register
or
sign in
to comment