segment: fix NULL pointer dereference in seg_write_header()
Since the pointer `oc' is NULL, oc->oformat->name will cause a null pointer dereference. This patch changes it to seg->oformat->name. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
26301caaa1
commit
e8769b37fe
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ static int seg_write_header(AVFormatContext *s)
|
||||||
}
|
}
|
||||||
if (seg->oformat->flags & AVFMT_NOFILE) {
|
if (seg->oformat->flags & AVFMT_NOFILE) {
|
||||||
av_log(s, AV_LOG_ERROR, "format %s not supported.\n",
|
av_log(s, AV_LOG_ERROR, "format %s not supported.\n",
|
||||||
oc->oformat->name);
|
seg->oformat->name);
|
||||||
ret = AVERROR(EINVAL);
|
ret = AVERROR(EINVAL);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue