summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavformat/cafdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index e9d171e36b..4df8744b79 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -328,7 +328,7 @@ static int read_header(AVFormatContext *s)
break;
}
- if (size > 0) {
+ if (size > 0 && (pb->seekable & AVIO_SEEKABLE_NORMAL)) {
if (pos > INT64_MAX - size)
return AVERROR_INVALIDDATA;
avio_skip(pb, FFMAX(0, pos + size - avio_tell(pb)));