提交 b3eab9fb 编写于 作者: B Baptiste Coudurier

seek inside buffer when offset is exactly at the end, fix seeking with memory ByteIOContext

Originally committed as revision 18487 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 3321cb3f
......@@ -148,7 +148,7 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence)
}
offset1 = offset - pos;
if (!s->must_flush &&
offset1 >= 0 && offset1 < (s->buf_end - s->buffer)) {
offset1 >= 0 && offset1 <= (s->buf_end - s->buffer)) {
/* can do the seek inside the buffer */
s->buf_ptr = s->buffer + offset1;
} else if(s->is_streamed && !s->write_flag &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册