Lines Matching refs:whence
227 static int64_t cache_seek(URLContext *h, int64_t pos, int whence)
232 if (whence == AVSEEK_SIZE) {
233 pos= ffurl_seek(c->inner, pos, whence);
245 if (whence == SEEK_CUR) {
246 whence = SEEK_SET;
248 } else if (whence == SEEK_END && c->is_true_eof) {
250 whence = SEEK_SET;
254 if (whence == SEEK_SET && pos >= 0 && pos < c->end) {
261 ret= ffurl_seek(c->inner, pos, whence);
262 if ((whence == SEEK_SET && pos >= c->logical_pos ||
263 whence == SEEK_END && pos <= 0) && ret < 0) {
264 if ( (whence == SEEK_SET && c->read_ahead_limit >= pos - c->logical_pos)
267 while (c->logical_pos < pos || whence == SEEK_END) {
269 if (whence == SEEK_SET)
272 if (ret == AVERROR_EOF && whence == SEEK_END) {