Commit efd36f22 authored by bcoudurier's avatar bcoudurier

only reset buffer state if seeking is sucessfull, update seek reg ref

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14491 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 80373894
......@@ -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