summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJun Zhao <barryjzhao@tencent.com>2019-11-02 22:46:00 +0800
committerJun Zhao <barryjzhao@tencent.com>2019-11-08 11:39:02 +0800
commita23c8d75ec34ea6dbc3c88e88f0ec6b6d6cbe91d (patch)
treef4c0edf3b2e4de62dea50ba9ec66db28abff7a94
parent5307c12acbafb1640123ab6d9591b3c1ab9d4c5d (diff)
downloadffmpeg-streaming-a23c8d75ec34ea6dbc3c88e88f0ec6b6d6cbe91d.zip
ffmpeg-streaming-a23c8d75ec34ea6dbc3c88e88f0ec6b6d6cbe91d.tar.gz
lavf/dashenc: enable probesize/max_analyze_duration setting in sub-demuxer
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>
-rw-r--r--libavformat/dashdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 7713ee8..facee4e 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -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);
OpenPOWER on IntegriCloud