summaryrefslogtreecommitdiff
path: root/libavformat/rmdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-09-27 16:26:37 +0200
committerAnton Khirnov <anton@khirnov.net>2016-09-30 16:54:33 +0200
commit83548fe894cdb455cc127f754d09905b6d23c173 (patch)
tree87d466a0d6b205a99ee046e44ab155a8e082f28c /libavformat/rmdec.c
parent8d1267932ca9c2e343ef303349101bab6681d02e (diff)
downloadffmpeg-83548fe894cdb455cc127f754d09905b6d23c173.tar.gz
lavf: fix usage of AVIOContext.seekable
It is supposed to be a flag. The only currently defined value is AVIO_SEEKABLE_NORMAL, but other ones may be added in the future. However all the current lavf code treats this field as a bool (mainly for historical reasons). Change all those cases to properly check for AVIO_SEEKABLE_NORMAL.
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 9774194e8e..51a5bf767c 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -519,7 +519,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);