[FFmpeg-cvslog] applehttp: fix variant discard logic

Luca Barbato git at videolan.org
Thu Aug 4 21:19:30 CEST 2011


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Thu Aug  4 01:06:58 2011 +0200| [1bf6cb85bebe639c836cdbb4498ea5bc252a7c21] | committer: Luca Barbato

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1bf6cb85bebe639c836cdbb4498ea5bc252a7c21
---

 libavformat/applehttp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/applehttp.c b/libavformat/applehttp.c
index 906511e..10f58af 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++) {



More information about the ffmpeg-cvslog mailing list