Re: [FFmpeg-devel] cache: read ahead to avoid excessive small requests

2018-09-25 Thread Robert Nagy
This is to resolve https://trac.ffmpeg.org/ticket/5080 On Mon, Sep 24, 2018 at 10:01 PM Michael Niedermayer wrote: > > On Sun, Sep 23, 2018 at 08:52:06PM +0200, Robert Nagy wrote: > > On Sun, Sep 23, 2018 at 1:40 PM Michael Niedermayer > > wrote: > > > > > > On Sat, Sep 22, 2018 at 07:32:28PM +02

Re: [FFmpeg-devel] cache: read ahead to avoid excessive small requests

2018-09-24 Thread Michael Niedermayer
On Sun, Sep 23, 2018 at 08:52:06PM +0200, Robert Nagy wrote: > On Sun, Sep 23, 2018 at 1:40 PM Michael Niedermayer > wrote: > > > > On Sat, Sep 22, 2018 at 07:32:28PM +0200, Robert Nagy wrote: > > > diff --git a/libavformat/cache.c b/libavformat/cache.c > > > index 66bbbf54c9..48ff5ab363 100644 >

Re: [FFmpeg-devel] cache: read ahead to avoid excessive small requests

2018-09-23 Thread Robert Nagy
On Sun, Sep 23, 2018 at 1:40 PM Michael Niedermayer wrote: > > On Sat, Sep 22, 2018 at 07:32:28PM +0200, Robert Nagy wrote: > > diff --git a/libavformat/cache.c b/libavformat/cache.c > > index 66bbbf54c9..48ff5ab363 100644 > > --- a/libavformat/cache.c > > +++ b/libavformat/cache.c > > @@ -153,6 +

Re: [FFmpeg-devel] cache: read ahead to avoid excessive small requests

2018-09-23 Thread Michael Niedermayer
On Sat, Sep 22, 2018 at 07:32:28PM +0200, Robert Nagy wrote: > diff --git a/libavformat/cache.c b/libavformat/cache.c > index 66bbbf54c9..48ff5ab363 100644 > --- a/libavformat/cache.c > +++ b/libavformat/cache.c > @@ -153,6 +153,38 @@ fail: > return ret; > } > > +static int cache_read_ahead(

[FFmpeg-devel] cache: read ahead to avoid excessive small requests

2018-09-22 Thread Robert Nagy
*diff --git a/libavformat/cache.c b/libavformat/cache.c* *index 66bbbf54c9..48ff5ab363 100644* *--- a/libavformat/cache.c* *+++ b/libavformat/cache.c* @@ -153,6 +153,38 @@ fail: return ret; } +static int cache_read_ahead(URLContext *h) +{ +Context *c= h->priv_data; +int64_

Re: [FFmpeg-devel] cache: read ahead to avoid excessive small requests

2018-09-22 Thread Robert Nagy
diff --git a/libavformat/cache.c b/libavformat/cache.c index 66bbbf54c9..48ff5ab363 100644 --- a/libavformat/cache.c +++ b/libavformat/cache.c @@ -153,6 +153,38 @@ fail: return ret; } +static int cache_read_ahead(URLContext *h) +{ +Context *c= h->priv_data; +int64_t r, read_ahead, po