diff mbox

[FFmpeg-devel] avformat/rtpenc_mpegts: copy metadata to mpegts sub-muxer

Message ID 20180702113804.GG8854@sunshine.barsnick.net
State Accepted
Commit 270f94e132b623bd6717515b3a72c5f1c535190b
Headers show

Commit Message

Moritz Barsnick July 2, 2018, 11:38 a.m. UTC
Fixes #7293.

Signed-off-by: Moritz Barsnick <barsnick@gmx.net>
---
Implemented to the best of my little knowledge (by checking other
metadata use cases). Feel free to correct.

Perhaps a candidate for backporting to release/4.0 or release/*?
---
 libavformat/rtpenc_mpegts.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Moritz Barsnick Sept. 7, 2018, 7:32 p.m. UTC | #1
On Mon, Jul 02, 2018 at 13:38:04 +0200, Moritz Barsnick wrote:
> Fixes #7293.

Ping.
Moritz Barsnick Sept. 19, 2019, 2:23 p.m. UTC | #2
On Fri, Sep 07, 2018 at 21:32:02 +0200, Moritz Barsnick wrote:
> On Mon, Jul 02, 2018 at 13:38:04 +0200, Moritz Barsnick wrote:
> > Fixes #7293.
>
> Ping.

Another friendly ping.

For reference, since it's quite a while back:
https://patchwork.ffmpeg.org/patch/9566/
Still applies cleanly to HEAD of master.

Thanks,
Moritz
Michael Niedermayer Sept. 20, 2019, 9:15 p.m. UTC | #3
On Thu, Sep 19, 2019 at 04:23:15PM +0200, Moritz Barsnick wrote:
> On Fri, Sep 07, 2018 at 21:32:02 +0200, Moritz Barsnick wrote:
> > On Mon, Jul 02, 2018 at 13:38:04 +0200, Moritz Barsnick wrote:
> > > Fixes #7293.
> >
> > Ping.
> 
> Another friendly ping.

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c
index 5f81e1a145..6e5614db2f 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)