summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-13 20:37:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-13 20:37:04 +0200
commitcc913f749088db3a5a15ae0d0d18df3a413fe3ba (patch)
treeb7079af6cee027e22e6e377ac9e4d94057666029 /libavformat/hls.c
parentffda8f0f0f4fe670d7786950f0533a3484bb991c (diff)
hls: check that the streams have been initialized before checking their discard flags.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index b56b6918bb..98d415149c 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -427,7 +427,7 @@ reload:
c->end_of_segment = 1;
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;
for (i = v->stream_offset; i < v->stream_offset + v->ctx->nb_streams;
i++) {