Commit cdd2d73d authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Martin Storsjö

hls: Don't check discard flags until the parent demuxer's streams actually exist

If passing the end of one segment while initializing the
chained demuxer, the parent demuxer's streams aren't set up
yet, so we can't recheck the discard flags.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 82bf8c87
...@@ -427,7 +427,8 @@ reload: ...@@ -427,7 +427,8 @@ reload:
c->end_of_segment = 1; c->end_of_segment = 1;
c->cur_seq_no = v->cur_seq_no; c->cur_seq_no = v->cur_seq_no;
if (v->ctx && v->ctx->nb_streams) { if (v->ctx && v->ctx->nb_streams &&
v->parent->nb_streams >= v->stream_offset + v->ctx->nb_streams) {
v->needed = 0; v->needed = 0;
for (i = v->stream_offset; i < v->stream_offset + v->ctx->nb_streams; for (i = v->stream_offset; i < v->stream_offset + v->ctx->nb_streams;
i++) { i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment