[FFmpeg-cvslog] hls: Don't check discard flags until the parent demuxer' s streams actually exist

Michael Niedermayer git at videolan.org
Mon Jul 29 14:08:48 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Aug 13 20:37:04 2012 +0200| [cdd2d73d315ecaf19ff49e64c91923275f1bda68] | committer: 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: Martin Storsjö <martin at martin.st>

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

 libavformat/hls.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index b9b1fea..213b717 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -427,7 +427,8 @@ 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++) {



More information about the ffmpeg-cvslog mailing list