summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc_mpegts.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-20 00:41:45 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-20 00:42:07 +0100
commita701a9cff4d53791ff811ebeaf1a644fca74191c (patch)
treefc32db26994c5f5c508b2ccf4e3aea67863965fe /libavformat/rtpenc_mpegts.c
parent6b0f54ddc746fe2b7939d279837051a427f85b62 (diff)
parentfc308b30bb24e623fed042ec78b10803b2362a18 (diff)
downloadffmpeg-a701a9cff4d53791ff811ebeaf1a644fca74191c.tar.gz
Merge commit 'fc308b30bb24e623fed042ec78b10803b2362a18'
* commit 'fc308b30bb24e623fed042ec78b10803b2362a18': rtpenc_mpegts: Call write_trailer for the mpegts muxer even if no output buffer exists Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpenc_mpegts.c')
-rw-r--r--libavformat/rtpenc_mpegts.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c
index a8203103da..e0339bd58d 100644
--- a/libavformat/rtpenc_mpegts.c
+++ b/libavformat/rtpenc_mpegts.c
@@ -32,11 +32,9 @@ static int rtp_mpegts_write_close(AVFormatContext *s)
struct MuxChain *chain = s->priv_data;
if (chain->mpegts_ctx) {
- if (!chain->mpegts_ctx->pb)
- avio_open_dyn_buf(&chain->mpegts_ctx->pb);
+ av_write_trailer(chain->mpegts_ctx);
if (chain->mpegts_ctx->pb) {
uint8_t *buf;
- av_write_trailer(chain->mpegts_ctx);
avio_close_dyn_buf(chain->mpegts_ctx->pb, &buf);
av_free(buf);
}