mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/hlsenc: Free context after hls_append_segment
Fixes reading uninitialized memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 530eb6acf8
)
Conflicts:
libavformat/hlsenc.c
This commit is contained in:
parent
a3fdc0b35b
commit
3bb48296ef
|
@ -329,9 +329,10 @@ static int hls_write_trailer(struct AVFormatContext *s)
|
|||
|
||||
av_write_trailer(oc);
|
||||
avio_closep(&oc->pb);
|
||||
avformat_free_context(oc);
|
||||
av_free(hls->basename);
|
||||
hls_append_segment(hls, hls->duration);
|
||||
avformat_free_context(oc);
|
||||
hls->avf = NULL;
|
||||
hls_window(s, 1);
|
||||
|
||||
hls_free_segments(hls);
|
||||
|
|
Loading…
Reference in New Issue