mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-20 06:11:04 +00:00
segment: fix null pointer dereference
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f1c69546c0
commit
4246032216
@ -174,11 +174,13 @@ static int seg_write_header(AVFormatContext *s)
|
||||
|
||||
fail:
|
||||
if (ret) {
|
||||
oc->streams = NULL;
|
||||
oc->nb_streams = 0;
|
||||
if (oc) {
|
||||
oc->streams = NULL;
|
||||
oc->nb_streams = 0;
|
||||
avformat_free_context(oc);
|
||||
}
|
||||
if (seg->list)
|
||||
avio_close(seg->pb);
|
||||
avformat_free_context(oc);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user