summaryrefslogtreecommitdiff
path: root/libavformat/hls.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-13 20:37:52 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-13 20:37:52 +0200
commit5e3900c7a53cbe3a376ff06c52e54108e94e6427 (patch)
treeacc85da25fb9e3d854c44577c2204f7955a1fa56 /libavformat/hls.c
parentcc913f749088db3a5a15ae0d0d18df3a413fe3ba (diff)
hls: Initialize stream_offset before find_stream_info.
find stream info causes reads that may use the offset in their callback Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r--libavformat/hls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/hls.c b/libavformat/hls.c
index 98d415149c..7add01f318 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -527,11 +527,11 @@ static int hls_read_header(AVFormatContext *s)
if (ret < 0)
goto fail;
+ v->stream_offset = stream_offset;
v->ctx->ctx_flags &= ~AVFMTCTX_NOHEADER;
ret = avformat_find_stream_info(v->ctx, NULL);
if (ret < 0)
goto fail;
- v->stream_offset = stream_offset;
snprintf(bitrate_str, sizeof(bitrate_str), "%d", v->bandwidth);
/* Create new AVStreams for each stream in this variant */
for (j = 0; j < v->ctx->nb_streams; j++) {