]> git.sesse.net Git - ffmpeg/commit
avformat/hlsenc: Only allocate when data is known to be needed
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 16 Dec 2019 00:04:05 +0000 (01:04 +0100)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 23 Dec 2019 06:05:33 +0000 (14:05 +0800)
commitae84305036ceced3813fb295b71d51343ffd9535
tree7b5ae8637a28cec94e3f043150da208746fff0c2
parent728c44b8613fdd2f75391b6575df4e9d47c24c63
avformat/hlsenc: Only allocate when data is known to be needed

hls_init() would allocate a buffer, although it is only needed in one of
two branches that follow. This commit moves the allocation to the branch
that actually needs the buffer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Reviewed-by: Steven Liu <lq@onvideo.cn>
libavformat/hlsenc.c