diff --git a/libavformat/hls.c b/libavformat/hls.c index 1512122410..0b7d050a5e 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -475,7 +475,7 @@ reload: static int hls_read_header(AVFormatContext *s) { - URLContext *u = s->pb->opaque; + URLContext *u = (s->flags & AVFMT_FLAG_CUSTOM_IO) ? NULL : s->pb->opaque; HLSContext *c = s->priv_data; int ret = 0, i, j, stream_offset = 0;