aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-16 04:02:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-06-10 02:13:06 +0200
commit3190acae6fd2c2dbf7c703b607cefe17286d013c (patch)
treef1ce3a137e9eab82841311ce929efb439fe8ebf6
parentac81fbba74155a595281d7401e79b95ed1d767aa (diff)
downloadffmpeg-3190acae6fd2c2dbf7c703b607cefe17286d013c.tar.gz
avformat/hlsenc: Free context after hls_append_segment
Fixes reading uninitialized memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 530eb6acf8ee867bf00728bf7efaf505da107e17) Conflicts: libavformat/hlsenc.c (cherry picked from commit 0ac22f043bee2f1c4daf5e1044b014326325d929) Conflicts: libavformat/hlsenc.c (cherry picked from commit 134d3e1c0331462ea94c78a5e13a63b20d283653) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/hlsenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index af04d09d2f..e080051270 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -306,9 +306,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);
append_entry(hls, hls->duration);
+ avformat_free_context(oc);
+ hls->avf = NULL;
hls_window(s, 1);
free_entries(hls);