Module: libav Branch: master Commit: e2ce16392205d8efe9143329ed3fb5fcb15498fa
Author: Martin Storsjö <[email protected]> Committer: Martin Storsjö <[email protected]> Date: Fri Dec 19 15:23:06 2014 +0200 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: Martin Storsjö <[email protected]> --- libavformat/mpegtsenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 8fa1c3e..1be4e55 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -1192,7 +1192,8 @@ static int mpegts_write_end(AVFormatContext *s) MpegTSService *service; int i; - mpegts_write_flush(s); + if (s->pb) + mpegts_write_flush(s); for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
