avformat/cafdec: try skipping various chunks only when seeking is possible

This commit is contained in:
Paul B Mahol 2021-09-03 01:19:53 +02:00
parent 646afae00f
commit 11d39873ab
1 changed files with 1 additions and 1 deletions

View File

@ -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)));