Browse Source

segment: fix null pointer dereference

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Paul B Mahol Michael Niedermayer 14 years ago
parent
commit
4246032216
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      libavformat/segment.c

+ 5
- 3
libavformat/segment.c View File

@@ -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…
Cancel
Save