1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avformat/subfile: Initialize end on all cases

Fixes: use of uninitialized variable
Regression since: e29016a9de

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer
2025-07-29 00:19:23 +02:00
parent 3ccd7d8c8e
commit ebcdba4c6b

View File

@ -118,11 +118,9 @@ static int64_t subfile_seek(URLContext *h, int64_t pos, int whence)
int64_t new_pos, end; int64_t new_pos, end;
int ret; int ret;
if (whence == AVSEEK_SIZE || whence == SEEK_END) {
end = c->end; end = c->end;
if (end == INT64_MAX && (end = ffurl_seek(c->h, 0, AVSEEK_SIZE)) < 0) if (end == INT64_MAX && (end = ffurl_seek(c->h, 0, AVSEEK_SIZE)) < 0)
return end; return end;
}
switch (whence) { switch (whence) {
case AVSEEK_SIZE: case AVSEEK_SIZE: