From: Jun Zhao <barryjz...@tencent.com>

Add probesize/max_analyze_duration support when open the sub-demuxer,
it's will be used to minimizing the initial delay.

Signed-off-by: Jun Zhao <barryjz...@tencent.com>
---
 libavformat/hls.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index 8ce1ad9..17a75e2 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -1907,6 +1907,8 @@ static int hls_read_header(AVFormatContext *s)
         }
         ffio_init_context(&pls->pb, pls->read_buffer, INITIAL_BUFFER_SIZE, 0, 
pls,
                           read_data, NULL, NULL);
+        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, pls->segments[0]->url,
                                     NULL, 0, 0);
         if (ret < 0) {
-- 
1.7.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to