Commit 42460322 authored by Paul B Mahol's avatar Paul B Mahol Committed by Michael Niedermayer

segment: fix null pointer dereference

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f1c69546
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment