mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
avformat/http: return ENOSYS instead of UINT64_MAX for unknown filesize
This matches the behavior of e.g. the pipe: protocol, which returns ENOSYS on account of ffurl_seek() not being implemented. The previous behavior of returning s->filesize directly is almost surely a bug, as s->filesize is UINT64_MAX when never initialized. Sponsored-by: nxtedition AB Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
+1
-1
@@ -2096,7 +2096,7 @@ static int64_t http_seek_internal(URLContext *h, int64_t off, int whence, int fo
|
||||
uint8_t discard[4096];
|
||||
|
||||
if (whence == AVSEEK_SIZE)
|
||||
return s->filesize;
|
||||
return s->filesize == UINT64_MAX ? AVERROR(ENOSYS) : s->filesize;
|
||||
else if ((s->filesize == UINT64_MAX && whence == SEEK_END))
|
||||
return AVERROR(ENOSYS);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user