[FFmpeg-cvslog] avformat/segment: set format options for all segments
Marton Balint
git at videolan.org
Sun Mar 27 00:10:20 CET 2016
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Tue Mar 15 19:19:20 2016 +0100| [8ff0f6ae8253d394f096b39d69b66e5247ed1066] | committer: Marton Balint
avformat/segment: set format options for all segments
Fixes ticket #5318.
Reviewed-by: Stefano Sabatini <stefasab at gmail.com>
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8ff0f6ae8253d394f096b39d69b66e5247ed1066
---
libavformat/segment.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 960a438..9ed1987 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -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;
}
More information about the ffmpeg-cvslog
mailing list