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>
Showing
Please
register
or
sign in
to comment