summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 9aef5e07f3..ea16f8abf3 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -529,6 +529,11 @@ static int hls_read_header(AVFormatContext *s)
ret = avformat_open_input(&v->ctx, v->segments[0]->url, in_fmt, NULL);
if (ret < 0)
goto fail;
+
+ v->ctx->ctx_flags &= ~AVFMTCTX_NOHEADER;
+ ret = avformat_find_stream_info(v->ctx, NULL);
+ if (ret < 0)
+ goto fail;
snprintf(bitrate_str, sizeof(bitrate_str), "%d", v->bandwidth);
program = av_new_program(s, i);