Commit 4895aa65 authored by Martin Storsjö's avatar Martin Storsjö

libavformat: Allow calling av_write_trailer with a NULL AVIOContext

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent cee4490b
......@@ -624,7 +624,7 @@ int av_write_trailer(AVFormatContext *s)
if (s->oformat->write_trailer)
ret = s->oformat->write_trailer(s);
if (!(s->oformat->flags & AVFMT_NOFILE))
if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
avio_flush(s->pb);
fail:
......
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