Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-06-09 Thread Michael Niedermayer
On Thu, Jun 08, 2017 at 02:02:49PM -0400, Ronald S. Bultje wrote: > Hi, > > On Thu, Jun 1, 2017 at 5:55 PM, Michael Niedermayer > wrote: > > > On Thu, Jun 01, 2017 at 07:48:38AM -0400, Ronald S. Bultje wrote: > > > Hi, > > > > > > On Thu, Jun 1, 2017 at 2:27 AM, raymond zheng < > > raymondzheng1

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-06-08 Thread Ronald S. Bultje
Hi, On Thu, Jun 1, 2017 at 5:55 PM, Michael Niedermayer wrote: > On Thu, Jun 01, 2017 at 07:48:38AM -0400, Ronald S. Bultje wrote: > > Hi, > > > > On Thu, Jun 1, 2017 at 2:27 AM, raymond zheng < > raymondzheng1...@gmail.com> > > wrote: > > > > > This patch is only for solving the bug introduced

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-06-01 Thread Michael Niedermayer
On Thu, Jun 01, 2017 at 07:48:38AM -0400, Ronald S. Bultje wrote: > Hi, > > On Thu, Jun 1, 2017 at 2:27 AM, raymond zheng > wrote: > > > This patch is only for solving the bug introduced by chunksize has been > > initial set as UINT64 MAX. > > > > I understand. So what will happen if the server

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-06-01 Thread Ronald S. Bultje
Hi, On Thu, Jun 1, 2017 at 2:27 AM, raymond zheng wrote: > This patch is only for solving the bug introduced by chunksize has been > initial set as UINT64 MAX. > I understand. So what will happen if the server responds that the chunksize is really actually UINT64_MAX? How do we distinguish betw

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-31 Thread raymond zheng
This patch is only for solving the bug introduced by chunksize has been initial set as UINT64 MAX. 2017-05-27 19:24 GMT+08:00 Ronald S. Bultje : > Hi, > > On Fri, May 26, 2017 at 10:36 PM, raymond zheng < > raymondzheng1...@gmail.com> wrote: > >> Hi: >> I find an issue about http. I don't us

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-27 Thread Ronald S. Bultje
Hi, On Fri, May 26, 2017 at 10:36 PM, raymond zheng wrote: > Hi: > I find an issue about http. I don't use chunked, so s->chunksize > will be set as UINT64_MAX when http open, but because of "if > (s->chunksize > 0) s->chunksize -= len;" then chunksize will not be > UINT64_MAX. > > If f

[FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-26 Thread raymond zheng
Hi: I find an issue about http. I don't use chunked, so s->chunksize will be set as UINT64_MAX when http open, but because of "if (s->chunksize > 0) s->chunksize -= len;" then chunksize will not be UINT64_MAX. If ffurl_read return to 0, s->off < target_end, http_buf_read will return to 0,

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-23 Thread raymond zheng
ping Ronald S. Bultje 2017-05-23 15:02 GMT+08:00 Steven Liu : > 2017-05-23 14:01 GMT+08:00 raymond zheng : > > > You can close http link on your http server, and check ffurl_read > result. > > > > Besides, this problem was caused by commit: > > 2a05c8f813de6f2278827734bf8102291e7484aa > > > ping

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-23 Thread Steven Liu
2017-05-23 14:01 GMT+08:00 raymond zheng : > You can close http link on your http server, and check ffurl_read result. > > Besides, this problem was caused by commit: > 2a05c8f813de6f2278827734bf8102291e7484aa > ping Ronald S. Bultje > > 2017-05-23 13:37 GMT+08:00 Steven Liu : > > > 2017-05-23 1

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-22 Thread raymond zheng
You can close http link on your http server, and check ffurl_read result. Besides, this problem was caused by commit: 2a05c8f813de6f2278827734bf8102291e7484aa 2017-05-23 13:37 GMT+08:00 Steven Liu : > 2017-05-23 10:47 GMT+08:00 raymond zheng : > > > 1. An exception occurred in the CDN edge ser

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-22 Thread Steven Liu
2017-05-23 10:47 GMT+08:00 raymond zheng : > 1. An exception occurred in the CDN edge server, that will lead to close > the http connection. > > 2. Because http is disconnected, so ffurl_read will return 0 > > 3. Avformat will consider I/O is eof > > 4. Right now http is actually disconnect abnor

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-22 Thread raymond zheng
1. An exception occurred in the CDN edge server, that will lead to close the http connection. 2. Because http is disconnected, so ffurl_read will return 0 3. Avformat will consider I/O is eof 4. Right now http is actually disconnect abnormally, it should return to ERROR, rather than return to E

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-22 Thread Steven Liu
2017-05-22 22:36 GMT+08:00 raymond zheng : > I don't think it need a timeout event to disconnect the link, because > when ffurl_read > return to 0, it means the link disconnect. If s->off < target_end, it > means AVERROR, > otherwise, it's normal eof. > I don't use chunked in HTTP, so s->chunksize

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-22 Thread raymond zheng
I don't think it need a timeout event to disconnect the link, because when ffurl_read return to 0, it means the link disconnect. If s->off < target_end, it means AVERROR, otherwise, it's normal eof. I don't use chunked in HTTP, so s->chunksize should be initial value, and shouldn't be changed or ev

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-22 Thread Steven Liu
2017-05-18 15:19 GMT+08:00 raymond zheng : > Hi: > I find an issue about http. I don't use chunked, so s->chunksize will > be set as UINT64_MAX when http open, but because of "if (s->chunksize > 0) > s->chunksize -= len;" then chunksize will not be UINT64_MAX. > > If ffurl_read return to 0

Re: [FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-21 Thread raymond zheng
ping... 2017-05-18 15:19 GMT+08:00 raymond zheng : > Hi: > I find an issue about http. I don't use chunked, so s->chunksize will > be set as UINT64_MAX when http open, but because of "if (s->chunksize > > 0) s->chunksize -= len;" then chunksize will not be UINT64_MAX. > > If ffurl_read re

[FFmpeg-devel] [PATCH]libavformat/http: fix http error eof

2017-05-18 Thread raymond zheng
Hi: I find an issue about http. I don't use chunked, so s->chunksize will be set as UINT64_MAX when http open, but because of "if (s->chunksize > 0) s->chunksize -= len;" then chunksize will not be UINT64_MAX. If ffurl_read return to 0, s->off < target_end, http_buf_read will return to 0,