Commit e2ce1639 authored by Martin Storsjö's avatar Martin Storsjö

mpegts: Support running the write_trailer function without an AVIOContext

If opening and closing dynamic buffers as AVIOContext, we may
not have any AVIOContext available when wanting to close and
deallocate the muxer. Allow calling write_trailer despite this.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 4895aa65
......@@ -1192,6 +1192,7 @@ static int mpegts_write_end(AVFormatContext *s)
MpegTSService *service;
int i;
if (s->pb)
mpegts_write_flush(s);
for (i = 0; i < s->nb_streams; i++) {
......
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