Skip to content

Commit

Permalink
lavf/dashenc: enable probesize/max_analyze_duration setting in sub-de…
Browse files Browse the repository at this point in the history
…muxer

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 <[email protected]>
  • Loading branch information
mypopydev committed Nov 8, 2019
1 parent 5307c12 commit a23c8d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libavformat/dashdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a23c8d7

Please sign in to comment.