diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2013-02-14 00:07:55 +0400 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2013-02-24 22:49:06 +0400 |
commit | db6e2e848b21d988fb108995387a8c7836da4dc7 (patch) | |
tree | 350e69dd4c7234b46f4569c62a115fdf92e175f2 /libavformat/hls.c | |
parent | 036df234fb289ad91c4b3d6f7329382c4e80d957 (diff) |
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>
Diffstat (limited to 'libavformat/hls.c')
-rw-r--r-- | libavformat/hls.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |