mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
avformat/hlsenc: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
91ea466551
commit
b8eb8b0310
@ -396,7 +396,7 @@ fail:
|
|||||||
|
|
||||||
av_dict_free(&options);
|
av_dict_free(&options);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
av_free(hls->basename);
|
av_freep(&hls->basename);
|
||||||
if (hls->avf)
|
if (hls->avf)
|
||||||
avformat_free_context(hls->avf);
|
avformat_free_context(hls->avf);
|
||||||
}
|
}
|
||||||
@ -479,7 +479,7 @@ static int hls_write_trailer(struct AVFormatContext *s)
|
|||||||
avio_closep(&oc->pb);
|
avio_closep(&oc->pb);
|
||||||
hls_append_segment(hls, hls->duration, hls->start_pos, hls->size);
|
hls_append_segment(hls, hls->duration, hls->start_pos, hls->size);
|
||||||
}
|
}
|
||||||
av_free(hls->basename);
|
av_freep(&hls->basename);
|
||||||
avformat_free_context(oc);
|
avformat_free_context(oc);
|
||||||
hls->avf = NULL;
|
hls->avf = NULL;
|
||||||
hls_window(s, 1);
|
hls_window(s, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user