[FFmpeg-devel] [PATCH] avformat/segment: set format options for all segments

Stefano Sabatini stefasab at gmail.com
Fri Mar 25 10:36:03 CET 2016


On date Tuesday 2016-03-15 19:21:23 +0100, Marton Balint encoded:
> Fixes ticket #5318.
> 
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
>  libavformat/segment.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/segment.c b/libavformat/segment.c
> index ccedd04..70590b4 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;
>      }

LGTM, missed the patch, thanks.
-- 
FFmpeg = Formidable and Forgiving Minimal Proud Ecumenical Gorilla


More information about the ffmpeg-devel mailing list