mirror of https://git.ffmpeg.org/ffmpeg.git
rtpenc_mpegts: Call write_trailer for the mpegts muxer even if no output buffer exists
Since the mpegts muxer now can handle being called with a NULL AVIOContext, we don't need to try to allocate one before calling write_trailer. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
e2ce163922
commit
fc308b30bb
|
@ -32,11 +32,9 @@ static int rtp_mpegts_write_close(AVFormatContext *s)
|
||||||
struct MuxChain *chain = s->priv_data;
|
struct MuxChain *chain = s->priv_data;
|
||||||
|
|
||||||
if (chain->mpegts_ctx) {
|
if (chain->mpegts_ctx) {
|
||||||
if (!chain->mpegts_ctx->pb)
|
av_write_trailer(chain->mpegts_ctx);
|
||||||
avio_open_dyn_buf(&chain->mpegts_ctx->pb);
|
|
||||||
if (chain->mpegts_ctx->pb) {
|
if (chain->mpegts_ctx->pb) {
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
av_write_trailer(chain->mpegts_ctx);
|
|
||||||
avio_close_dyn_buf(chain->mpegts_ctx->pb, &buf);
|
avio_close_dyn_buf(chain->mpegts_ctx->pb, &buf);
|
||||||
av_free(buf);
|
av_free(buf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue