Mercurial > mplayer.hg
diff stream/cache2.c @ 32472:5d1d67cf8718
Add internal read and seek function to avoid a useless memcpy when using
the cache.
| author | reimar |
|---|---|
| date | Wed, 27 Oct 2010 19:04:04 +0000 |
| parents | 0c7c4ed0b7eb |
| children | 0624fa95a2aa |
line wrap: on
line diff
--- a/stream/cache2.c Wed Oct 27 18:38:39 2010 +0000 +++ b/stream/cache2.c Wed Oct 27 19:04:04 2010 +0000 @@ -182,7 +182,7 @@ s->offset= // FIXME!? s->min_filepos=s->max_filepos=read; // drop cache content :( if(s->stream->eof) stream_reset(s->stream); - stream_seek(s->stream,read); + stream_seek_internal(s->stream,read); mp_msg(MSGT_CACHE,MSGL_DBG2,"Seek done. new pos: 0x%"PRIX64" \n",(int64_t)stream_tell(s->stream)); } } @@ -224,7 +224,7 @@ s->min_filepos=read-back; // avoid seeking-back to temp area... #endif - len=stream_read(s->stream,&s->buffer[pos],space); + len = stream_read_internal(s->stream, &s->buffer[pos], space); s->eof= !len; s->max_filepos+=len;
