• Andreas Rheinhardt's avatar
    avformat/hlsenc: Fix leak of options when writing packets · bd131b64
    Andreas Rheinhardt authored
    Under certain circumstances hls_write_packet() would add options to an
    AVDictionary. Said dictionary was never explicitly freed, instead it was
    presumed that these options would be consumed when opening a new
    IO-context. This left several possibilities for memleaks:
    
    a) When no new IO-context would be opened at all. This is possible when
    using both the flags temp_file and single_file together with a file
    output.
    b) When an error happens before one actually tries to open the new
    IO-context.
    c) When the new IO-context does not consume all options.
    
    All three have been fixed; furthermore, the AVDictionary has been put
    into a smaller scope (namely the only part of hls_write_packet() where
    it is actually used).
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Reviewed-by: 's avatarSteven Liu <lq@onvideo.cn>
    bd131b64
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...