mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
lavf/aviobuf: make AVSEEK_SIZE usable from outside.
This commit is contained in:
parent
2b4c1a0f3c
commit
6e1a2dc112
@ -255,6 +255,9 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
|
||||
if(!s)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
if ((whence & AVSEEK_SIZE))
|
||||
return s->seek ? s->seek(s->opaque, offset, AVSEEK_SIZE) : AVERROR(ENOSYS);
|
||||
|
||||
buffer_size = s->buf_end - s->buffer;
|
||||
// pos is the absolute position that the beginning of s->buffer corresponds to in the file
|
||||
pos = s->pos - (s->write_flag ? 0 : buffer_size);
|
||||
|
Loading…
Reference in New Issue
Block a user