mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
libavformat: Allow calling av_write_trailer with a NULL AVIOContext
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
cee4490b52
commit
4895aa65c6
@ -624,7 +624,7 @@ int av_write_trailer(AVFormatContext *s)
|
|||||||
if (s->oformat->write_trailer)
|
if (s->oformat->write_trailer)
|
||||||
ret = s->oformat->write_trailer(s);
|
ret = s->oformat->write_trailer(s);
|
||||||
|
|
||||||
if (!(s->oformat->flags & AVFMT_NOFILE))
|
if (!(s->oformat->flags & AVFMT_NOFILE) && s->pb)
|
||||||
avio_flush(s->pb);
|
avio_flush(s->pb);
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user