mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
avformat/aviobuf: Allow seeking to the end of the buffer for read only buffers
This undoes the effect of 3c18a7b188
for reading
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
0b4fc4bacd
commit
58ed152857
@ -228,7 +228,7 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence)
|
||||
|
||||
offset1 = offset - pos;
|
||||
if (!s->must_flush && (!s->direct || !s->seek) &&
|
||||
offset1 >= 0 && offset1 < buffer_size) {
|
||||
offset1 >= 0 && offset1 <= buffer_size - s->write_flag) {
|
||||
/* can do the seek inside the buffer */
|
||||
s->buf_ptr = s->buffer + offset1;
|
||||
} else if ((!s->seekable ||
|
||||
|
Loading…
Reference in New Issue
Block a user