1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/segment: set format options for all segments

Fixes ticket #5318.

Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
Marton Balint 2016-03-15 19:19:20 +01:00
parent 5a19506088
commit 8ff0f6ae82

View 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;
}