[FFmpeg-devel] [PATCH] lavf/segment: copy chapter metadata to output

Stefano Sabatini stefasab at gmail.com
Fri Mar 20 14:27:44 CET 2015


---
 libavformat/segment.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index 947a0c6..b465cc5 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -189,6 +189,9 @@ static int segment_mux_init(AVFormatContext *s)
     oc->max_delay          = s->max_delay;
     av_dict_copy(&oc->metadata, s->metadata, 0);
 
+    if (s->nb_chapters && seg->chapter_index >= 0)
+        av_dict_copy(&oc->metadata, s->chapters[seg->chapter_index]->metadata, 0);
+
     for (i = 0; i < s->nb_streams; i++) {
         AVStream *st;
         AVCodecContext *icodec, *ocodec;
-- 
1.8.3.2



More information about the ffmpeg-devel mailing list