Fixes reading uninitialized memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 530eb6acf8ee867bf00728bf7efaf505da107e17)
Conflicts:
libavformat/hlsenc.c
... | ... |
@@ -329,9 +329,10 @@ static int hls_write_trailer(struct AVFormatContext *s) |
329 | 329 |
|
330 | 330 |
av_write_trailer(oc); |
331 | 331 |
avio_closep(&oc->pb); |
332 |
- avformat_free_context(oc); |
|
333 | 332 |
av_free(hls->basename); |
334 | 333 |
hls_append_segment(hls, hls->duration); |
334 |
+ avformat_free_context(oc); |
|
335 |
+ hls->avf = NULL; |
|
335 | 336 |
hls_window(s, 1); |
336 | 337 |
|
337 | 338 |
hls_free_segments(hls); |