[FFmpeg-devel] [PATCH] libavformat/dashdec: Fix issue with dash on Windows

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Thu Oct 8 17:00:48 EEST 2020


Christopher Degawa:
>> You should also reset c->adaptionset_lang to NULL after freeing it. (I
>> remember finding this issue myself, but somehow forgot to fix it. Strange.)
> 
> Ah, I forgot that's what av_freep does in addition to freeing, do you
> wish to make the change, or do you want me to?
> 
I already made a patch and sent it to the ML a few minutes ago, but
somehow it is still stuck. I'll just apply it, it's trivial anyway.

>> (Actually, the lifetime of adaptionset_lang does not extend beyond
>> parse_manifest_adaptationset(), so one could even use a local variable
>> for it.)
> 
> I do also see it being used in parse_manifest_representation, so that
> would be one more place you would need to make sure to pass the local
> variable, but that would save space on the struct.

Yeah, but parse_manifest_representation() is only called from
parse_manifest_adaptationset(), so it is possible.
(This is also the reason why I forgot to fix it: Initially I believed
there was a memleak when adaptionset_lang is simply overwritten without
checking whether it is not NULL, but then I saw that it actually always
is NULL at that point and so I didn't change anything, despite noticing
that it should use xmlFree().)

- Andreas


More information about the ffmpeg-devel mailing list