Commit 39a127bf authored by Baptiste Coudurier's avatar Baptiste Coudurier

Only reset buffer state if seeking is successful; update seek reg ref.

Originally committed as revision 14491 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d701934b
......@@ -163,14 +163,13 @@ offset_t url_fseek(ByteIOContext *s, offset_t offset, int whence)
if (s->write_flag) {
flush_buffer(s);
s->must_flush = 1;
} else
#endif /* defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK) */
{
s->buf_end = s->buffer;
}
s->buf_ptr = s->buffer;
#endif /* defined(CONFIG_MUXERS) || defined(CONFIG_NETWORK) */
if (!s->seek || (res = s->seek(s->opaque, offset, SEEK_SET)) < 0)
return res;
if (!s->write_flag)
s->buf_end = s->buffer;
s->buf_ptr = s->buffer;
s->pos = offset;
}
s->eof_reached = 0;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment