[FFmpeg-cvslog] avformat/cafdec: try skipping various chunks only when seeking is possible

Paul B Mahol git at videolan.org
Fri Sep 3 02:22:28 EEST 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Sep  3 01:19:53 2021 +0200| [11d39873abcddf2f1aad2cdfadccbdb41b80d5af] | committer: Paul B Mahol

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=11d39873abcddf2f1aad2cdfadccbdb41b80d5af
---

 libavformat/cafdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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



More information about the ffmpeg-cvslog mailing list