ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | Sun Jun 8 00:52:46 2025 +0200| [e3ba364c5ee9747f53c94904608a075cadd53042] | committer: Andreas Rheinhardt
avformat/dhav: Fix check for seekability AVIOContext.seekable is a bitfield. Also check for seekability earlier. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3ba364c5ee9747f53c94904608a075cadd53042 --- libavformat/dhav.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/dhav.c b/libavformat/dhav.c index c7e5371636..ffd6d66359 100644 --- a/libavformat/dhav.c +++ b/libavformat/dhav.c @@ -237,6 +237,9 @@ static void get_timeinfo(unsigned date, struct tm *timeinfo) static int64_t get_duration(AVFormatContext *s) { + if (!(s->pb->seekable & AVIO_SEEKABLE_NORMAL)) + return 0; + int64_t start_pos = avio_tell(s->pb); int64_t end_pos = -1; int64_t start = 0, end = 0; @@ -248,9 +251,6 @@ static int64_t get_duration(AVFormatContext *s) unsigned date; int64_t size = avio_size(s->pb); - if (!s->pb->seekable) - return 0; - if (start_pos + 16 > size) return 0; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".