summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-25 17:40:33 +0200
committerMartin Storsjö <martin@martin.st>2013-07-30 12:31:08 +0300
commit9696740af715e50ef7098272e56e154826caa332 (patch)
treef9dd25635a6b09a946645f168dd9e94e0886e3a5 /libavformat/hls.c
parent78b4bfdb84b7c909f7b97c87de17f59e36c50559 (diff)
hls: Call avformat_find_stream_info() on the chained demuxers
This allows the chained demuxer (or more precisely, the lavf utility code) to better fill in timestamps on packets from these, especially for cases where one stream is a raw ADTS stream. Signed-off-by: Martin Storsjö <martin@martin.st>
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);