segment: fix null ptr deref

Fixes CID732220
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-05 20:25:25 +01:00
parent 962314fe27
commit 30d27685b1

View File

@ -386,7 +386,7 @@ static int seg_write_header(AVFormatContext *s)
}
if (seg->oformat->flags & AVFMT_NOFILE) {
av_log(s, AV_LOG_ERROR, "format %s not supported.\n",
oc->oformat->name);
seg->oformat->name);
ret = AVERROR(EINVAL);
goto fail;
}