]> git.sesse.net Git - ffmpeg/commitdiff
avformat/hlsenc: allow a custom SDT and PAT period
authorMarton Balint <cus@passwd.hu>
Mon, 23 Dec 2019 00:36:41 +0000 (01:36 +0100)
committerMarton Balint <cus@passwd.hu>
Wed, 5 Feb 2020 20:27:30 +0000 (21:27 +0100)
The default is not to write SDT and PAT periodically, only in the beginning of
every segment. After this patch the user might override this if needed.

Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/hlsenc.c

index 87b861d437e260346904d6ff5ee3b2b16314db2e..f6dd894343c113f48a99dcafdc12140b6a0fad01 100644 (file)
@@ -861,8 +861,8 @@ static int hls_mux_init(AVFormatContext *s, VariantStream *vs)
         /* We only require one PAT/PMT per segment. */
         char period[21];
         snprintf(period, sizeof(period), "%d", (INT_MAX / 2) - 1);
-        av_dict_set(&options, "sdt_period", period, 0);
-        av_dict_set(&options, "pat_period", period, 0);
+        av_dict_set(&options, "sdt_period", period, AV_DICT_DONT_OVERWRITE);
+        av_dict_set(&options, "pat_period", period, AV_DICT_DONT_OVERWRITE);
     }
     ret = avformat_init_output(oc, &options);
     remaining_options = av_dict_count(options);