]> git.sesse.net Git - ffmpeg/commitdiff
avformat/segment: set format options for all segments
authorMarton Balint <cus@passwd.hu>
Tue, 15 Mar 2016 18:19:20 +0000 (19:19 +0100)
committerMarton Balint <cus@passwd.hu>
Sat, 26 Mar 2016 22:26:27 +0000 (23:26 +0100)
Fixes ticket #5318.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/segment.c

index 960a438a4da90bb54e2e30ae0dd41d5c4edc845a..9ed1987709a302296bb73554e6e8355318ea1ce2 100644 (file)
@@ -256,7 +256,11 @@ static int segment_start(AVFormatContext *s, int write_header)
         av_opt_set(oc->priv_data, "mpegts_flags", "+resend_headers", 0);
 
     if (write_header) {
-        if ((err = avformat_write_header(oc, NULL)) < 0)
+        AVDictionary *options = NULL;
+        av_dict_copy(&options, seg->format_options, 0);
+        err = avformat_write_header(oc, &options);
+        av_dict_free(&options);
+        if (err < 0)
             return err;
     }