aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/segment.c
diff options
context:
space:
mode:
authorXi Wang <xi.wang@gmail.com>2012-11-14 02:52:32 -0500
committerMartin Storsjö <martin@martin.st>2012-11-14 12:33:27 +0200
commite8769b37fe8a841c0d28d3686c6d3cdecc542bc7 (patch)
tree5b2ced9bf5a9011b51932971e3b6620af96561f9 /libavformat/segment.c
parent26301caaa1aec5d71b564bff452147d6183370bf (diff)
downloadffmpeg-e8769b37fe8a841c0d28d3686c6d3cdecc542bc7.tar.gz
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>
Diffstat (limited to 'libavformat/segment.c')
-rw-r--r--libavformat/segment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index fd5283560e..8afb41f93d 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -210,7 +210,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;
}