[FFmpeg-devel] [PATCH] libavformat/avio: fix fill_buffer return error eof when offset1 == buffer_size
raymond zheng
raymondzheng1412 at gmail.com
Wed May 10 10:49:34 EEST 2017
ping...
2017-05-08 18:57 GMT+08:00 raymondzheng <raymondzheng1412 at gmail.com>:
> ---
> libavformat/aviobuf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c
> index 0a7c39eacd..20d3b7a02a 100644
> --- a/libavformat/aviobuf.c
> +++ b/libavformat/aviobuf.c
> @@ -270,7 +270,7 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int
> whence)
>
> offset1 = offset - pos; // "offset1" is the relative offset from the
> beginning of s->buffer
> if (!s->must_flush && (!s->direct || !s->seek) &&
> - offset1 >= 0 && offset1 <= buffer_size - s->write_flag) {
> + 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 & AVIO_SEEKABLE_NORMAL) ||
> --
> 2.11.0 (Apple Git-81)
>
>
More information about the ffmpeg-devel
mailing list