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:
committed by
Michael Niedermayer
parent
f1c69546c0
commit
4246032216
@@ -174,11 +174,13 @@ static int seg_write_header(AVFormatContext *s)
|
|||||||
|
|
||||||
fail:
|
fail:
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
if (oc) {
|
||||||
oc->streams = NULL;
|
oc->streams = NULL;
|
||||||
oc->nb_streams = 0;
|
oc->nb_streams = 0;
|
||||||
|
avformat_free_context(oc);
|
||||||
|
}
|
||||||
if (seg->list)
|
if (seg->list)
|
||||||
avio_close(seg->pb);
|
avio_close(seg->pb);
|
||||||
avformat_free_context(oc);
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user