summaryrefslogtreecommitdiff
path: root/libavformat/applehttp.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2011-08-04 01:06:58 +0200
committerLuca Barbato <lu_zero@gentoo.org>2011-08-04 11:21:33 +0200
commit1bf6cb85bebe639c836cdbb4498ea5bc252a7c21 (patch)
treefca9c7b8e43ca339e378a660982803adcdfd036f /libavformat/applehttp.c
parentad62507f325ae4e93690a581283eb54dcfd4fee0 (diff)
applehttp: fix variant discard logic
The v->ctx is always not NULL now, check for streams presence to mark the read_header state. Fixes bug #25, possibly introduced by 603b8bc
Diffstat (limited to 'libavformat/applehttp.c')
-rw-r--r--libavformat/applehttp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 906511ed06..10f58afde5 100644
--- a/libavformat/applehttp.c
+++ b/libavformat/applehttp.c
@@ -412,7 +412,7 @@ reload:
c->end_of_segment = 1;
c->cur_seq_no = v->cur_seq_no;
- if (v->ctx) {
+ if (v->ctx && v->ctx->nb_streams) {
v->needed = 0;
for (i = v->stream_offset; i < v->stream_offset + v->ctx->nb_streams;
i++) {