summaryrefslogtreecommitdiff
path: root/libavformat/rmdec.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-03-21 17:02:30 -0300
committerJames Almer <jamrial@gmail.com>2017-03-21 17:02:30 -0300
commit4de591e6fb7361bd417dcd9563672ed0ad8b361b (patch)
treeff6b5c51a4891b49f61d53b88bdfb27cc6a89579 /libavformat/rmdec.c
parent423375d4f06ae7103e575a31c23e62e3ba440845 (diff)
parent83548fe894cdb455cc127f754d09905b6d23c173 (diff)
Merge commit '83548fe894cdb455cc127f754d09905b6d23c173'
* commit '83548fe894cdb455cc127f754d09905b6d23c173': lavf: fix usage of AVIOContext.seekable Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/rmdec.c')
-rw-r--r--libavformat/rmdec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 222c43378c..e6a1fe8842 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -651,7 +651,8 @@ static int rm_read_header(AVFormatContext *s)
if (!data_off)
data_off = avio_tell(pb) - 18;
- if (indx_off && pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) &&
+ if (indx_off && (pb->seekable & AVIO_SEEKABLE_NORMAL) &&
+ !(s->flags & AVFMT_FLAG_IGNIDX) &&
avio_seek(pb, indx_off, SEEK_SET) >= 0) {
rm_read_index(s);
avio_seek(pb, data_off + 18, SEEK_SET);