summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc_mpegts.c
diff options
context:
space:
mode:
authorMoritz Barsnick <barsnick@gmx.net>2018-07-02 13:38:04 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-09-20 23:26:34 +0200
commit270f94e132b623bd6717515b3a72c5f1c535190b (patch)
tree78829d7c03aaeffd9e5b75184dae3a2e52a579a9 /libavformat/rtpenc_mpegts.c
parent6390f52ac79932ed53a96619aa9cf2efd0a0fd19 (diff)
downloadffmpeg-270f94e132b623bd6717515b3a72c5f1c535190b.tar.gz
avformat/rtpenc_mpegts: copy metadata to mpegts sub-muxer
Fixes #7293. Signed-off-by: Moritz Barsnick <barsnick@gmx.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/rtpenc_mpegts.c')
-rw-r--r--libavformat/rtpenc_mpegts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c
index 969dbff3d6..45ba6fffe5 100644
--- a/libavformat/rtpenc_mpegts.c
+++ b/libavformat/rtpenc_mpegts.c
@@ -60,6 +60,7 @@ static int rtp_mpegts_write_header(AVFormatContext *s)
return AVERROR(ENOMEM);
mpegts_ctx->oformat = mpegts_format;
mpegts_ctx->max_delay = s->max_delay;
+ av_dict_copy(&mpegts_ctx->metadata, s->metadata, 0);
for (i = 0; i < s->nb_streams; i++) {
AVStream* st = avformat_new_stream(mpegts_ctx, NULL);
if (!st)
@@ -102,6 +103,7 @@ static int rtp_mpegts_write_header(AVFormatContext *s)
fail:
if (mpegts_ctx) {
ffio_free_dyn_buf(&mpegts_ctx->pb);
+ av_dict_free(&mpegts_ctx->metadata);
avformat_free_context(mpegts_ctx);
}
if (rtp_ctx)