]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/hls.c
lavf/hls: support probesize/max_analyze_duration when open sub-demuxer
[ffmpeg] / libavformat / hls.c
index 8ce1ad97261dc2ddc6bdac6e8e494bdc5ff92132..17a75e20cd5c1132e4d89c7437bf43d76e89ba87 100644 (file)
@@ -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) {