mirror of https://git.ffmpeg.org/ffmpeg.git
hls: do not access pb->opaque for custom IO.
As the name indicates we can't just assume what the "opaque" field contains. This fixes a crash in third-party applications see e.g.: http://bugzilla.mplayerhq.hu/show_bug.cgi?id=2126 This fixes also FFmpeg trac #2293, which is a different third-party application. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
parent
036df234fb
commit
db6e2e848b
|
@ -475,7 +475,7 @@ reload:
|
||||||
|
|
||||||
static int hls_read_header(AVFormatContext *s)
|
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;
|
HLSContext *c = s->priv_data;
|
||||||
int ret = 0, i, j, stream_offset = 0;
|
int ret = 0, i, j, stream_offset = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue