Re: [FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-13 Thread Michael Niedermayer
On Thu, Mar 12, 2015 at 11:39:55AM +0800, Zhang Rui wrote: > --- > libavformat/http.c | 32 +++- > 1 file changed, 27 insertions(+), 5 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is

[FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-11 Thread Zhang Rui
--- libavformat/http.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 55dcb6e..86380b2 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -93,6 +93,7 @@ typedef struct HTTPContext { A

Re: [FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-08 Thread Zhang Rui
>> +read_ret = http_buf_read(h, buf, size); >> +if (s->reconnect && s->filesize > 0 && s->off < s->filesize && >> read_ret < 0) { >> > > minor: you can chek read_ret < 0 first, this condition usually will net be > meet. Fine, I'll fix. >> +av_log(h, AV_LOG_WARNING, "Will reconnect

Re: [FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-08 Thread Zhang Rui
>> +{ "reconnect", "auto reconnect after disconnect before EOF", >> OFFSET(reconnect), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, D }, > > The default of this setting is probably worth a discussion. The default value is not my concern, So I make the default behavior remain unchanged. May I have you

Re: [FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-06 Thread Lukasz Marek
On 6 March 2015 at 11:19, Zhang Rui wrote: > if (!s->hd) > return AVERROR_EOF; > @@ -945,7 +949,19 @@ static int http_read_stream(URLContext *h, uint8_t > *buf, int size) > if (s->compressed) > return http_buf_read_compressed(h, buf, size); > #endif /* CONFIG_ZLIB */

Re: [FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-06 Thread wm4
On Fri, 6 Mar 2015 18:19:14 +0800 Zhang Rui wrote: > --- > libavformat/http.c | 32 +++- > 1 file changed, 27 insertions(+), 5 deletions(-) > > diff --git a/libavformat/http.c b/libavformat/http.c > index 55dcb6e..9d44f3b 100644 > --- a/libavformat/http.c > +++ b/li

[FFmpeg-devel] [PATCH] avformat/http: support auto reconnect

2015-03-06 Thread Zhang Rui
--- libavformat/http.c | 32 +++- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/libavformat/http.c b/libavformat/http.c index 55dcb6e..9d44f3b 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -93,6 +93,7 @@ typedef struct HTTPContext { A