[FFmpeg-devel] [PATCH] libavformat/dashenc.c:keep same with streaming , when live end

James Almer jamrial at gmail.com
Fri May 29 15:31:20 EEST 2020


On 5/29/2020 4:19 AM, Siyuan Huang wrote:
> sidx box is used for single file cases , should not apply to streaming/live
> case
> 
>  
> 
> Signed-off-by: SiyuanHuang <saber.huang at samsung.com>
> 
> ---
> 
> libavformat/dashenc.c | 2 +-
> 
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
>  
> 
> diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
> 
> index df081ce3ef..2b2a77267b 100755
> 
> --- a/libavformat/dashenc.c
> 
> +++ b/libavformat/dashenc.c
> 
> @@ -1616,7 +1616,7 @@ static int dash_init(AVFormatContext *s)
> 
>                  if (c->global_sidx)
> 
>                      av_dict_set(&opts, "movflags",
> "+dash+delay_moov+global_sidx+skip_trailer", AV_DICT_APPEND);
> 
>                  else
> 
> -                    av_dict_set(&opts, "movflags",
> "+dash+delay_moov+skip_trailer", AV_DICT_APPEND);
> 
> +                    av_dict_set(&opts, "movflags",
> "+dash+delay_moov+skip_sidx+skip_trailer", AV_DICT_APPEND);

This is not the live/streaming case.

You should instead separately check for c->single_file and then append
+skip_sidx based on its value.

> 
>              }
> 
>              if (os->frag_type == FRAG_TYPE_EVERY_FRAME)
> 
>                  av_dict_set(&opts, "movflags", "+frag_every_frame",
> AV_DICT_APPEND);
> 



More information about the ffmpeg-devel mailing list