]> git.sesse.net Git - ffmpeg/commitdiff
lavf/dashenc: enable probesize/max_analyze_duration setting in sub-demuxer
authorJun Zhao <barryjzhao@tencent.com>
Sat, 2 Nov 2019 14:46:00 +0000 (22:46 +0800)
committerJun Zhao <barryjzhao@tencent.com>
Fri, 8 Nov 2019 03:39:02 +0000 (11:39 +0800)
Enable probesize/max_analyze_duration setting when open the sub-demuxer,
it's will be used to minimizing the initial delay.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
libavformat/dashdec.c

index 7713ee8907ca10e64ce2e1edfd11fe629624811d..facee4e45a58d84e1243884987053c7e1003e9d0 100644 (file)
@@ -1935,8 +1935,8 @@ static int reopen_demux_for_component(AVFormatContext *s, struct representation
         goto fail;
 
     pls->ctx->flags = AVFMT_FLAG_CUSTOM_IO;
-    pls->ctx->probesize = 1024 * 4;
-    pls->ctx->max_analyze_duration = 4 * AV_TIME_BASE;
+    pls->ctx->probesize = s->probesize > 0 ? s->probesize : 1024 * 4;;
+    pls->ctx->max_analyze_duration = s->max_analyze_duration > 0 ? s->max_analyze_duration : 4 * AV_TIME_BASE;
     ret = av_probe_input_buffer(&pls->pb, &in_fmt, "", NULL, 0, 0);
     if (ret < 0) {
         av_log(s, AV_LOG_ERROR, "Error when loading first fragment, playlist %d\n", (int)pls->rep_idx);