This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 37515cfd87561e07c5766ea04de5b1ca6f6c0a98 Author: Kacper Michajłow <[email protected]> AuthorDate: Wed Oct 28 06:13:47 2026 +0100 Commit: Kacper Michajłow <[email protected]> CommitDate: Thu Oct 29 18:28:42 2026 +0000 avformat/subfile: clip the seek offsets to int64 Use av_clip64(), and clamp the end to the start when the start lies past the end of the file, so the bounds do not cross and the size is 0 rather than negative. Fixes: e29016a9de Signed-off-by: Kacper Michajłow <[email protected]> --- libavformat/subfile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/subfile.c b/libavformat/subfile.c index a77e477db2..dc4fe24442 100644 --- a/libavformat/subfile.c +++ b/libavformat/subfile.c @@ -123,18 +123,19 @@ static int64_t subfile_seek(URLContext *h, int64_t pos, int whence) end = c->end; if (end == INT64_MAX && (end = ffurl_seek(c->h, 0, AVSEEK_SIZE)) < 0) return end; + end = FFMAX(end, c->start); switch (whence) { case AVSEEK_SIZE: return end - c->start; case SEEK_SET: - new_pos = c->start + av_clip(pos, 0, end - c->start); + new_pos = c->start + av_clip64(pos, 0, end - c->start); break; case SEEK_CUR: - new_pos = c->pos + av_clip(pos, -(c->pos - c->start), end - c->pos); + new_pos = c->pos + av_clip64(pos, -(c->pos - c->start), end - c->pos); break; case SEEK_END: - new_pos = end + av_clip(pos, -(end - c->start), 0); + new_pos = end + av_clip64(pos, -(end - c->start), 0); break; default: av_assert0(0); -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
