From c705341931c01e26b9e3c0aad961d87c3c1ea072 Mon Sep 17 00:00:00 2001
From: SiyuanHuang <saber.huang@samsung.com>
Date: Mon, 1 Jun 2020 17:54:20 +0800
Subject: [PATCH] [PATCH] libavformat/dashenc.c:keep same with streaming

sidx box is used for single file cases , should not used for other cases

Signed-off-by: SiyuanHuang <saber.huang@samsung.com>
---
 libavformat/dashenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c
index df081ce3ef..9a67f12301 100755
--- a/libavformat/dashenc.c
+++ b/libavformat/dashenc.c
@@ -1615,6 +1615,8 @@ static int dash_init(AVFormatContext *s)
             else {
                 if (c->global_sidx)
                     av_dict_set(&opts, "movflags", "+dash+delay_moov+global_sidx+skip_trailer", AV_DICT_APPEND);
+                else if (!c->single_file)
+                    av_dict_set(&opts, "movflags", "+dash+delay_moov+skip_sidx+skip_trailer", AV_DICT_APPEND);
                 else
                     av_dict_set(&opts, "movflags", "+dash+delay_moov+skip_trailer", AV_DICT_APPEND);
             }
-- 
2.17.1

