[FFmpeg-devel] [PATCH] libavformat/dashenc.c:kill latency when ldash on

Siyuan Huang saber.huang at samsung.com
Tue Jun 30 06:12:11 EEST 2020


From: Siyuan Huang <saber.huang at samsung.com>

 

disable write tmp file to let it using chunk downloading at last segment

 

Signed-off-by: Siyuan Huang <saber.huang at samsung.com>

---

libavformat/dashenc.c | 2 ++

1 file changed, 2 insertions(+)

mode change 100644 => 100755 libavformat/dashenc.c

 

diff --git a/libavformat/dashenc.c b/libavformat/dashenc.c

old mode 100644

new mode 100755

index 62193058d7..66a8a62294

--- a/libavformat/dashenc.c

+++ b/libavformat/dashenc.c

@@ -2229,6 +2229,8 @@ static int dash_write_packet(AVFormatContext *s,
AVPacket *pkt)

         AVDictionary *opts = NULL;

        const char *proto = avio_find_protocol_name(s->url);

         int use_rename = proto && !strcmp(proto, "file");

+        if (c->ldash)

+            use_rename = 0;

         if (os->segment_type == SEGMENT_TYPE_MP4)

             write_styp(os->ctx->pb);

         os->filename[0] = os->full_path[0] = os->temp_path[0] = '\0';

-- 

2.17.1

 



More information about the ffmpeg-devel mailing list