diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-18 20:05:32 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-18 20:07:00 +0200 |
commit | 82edf6727f0663601351081ca1e4fb20d1752972 (patch) | |
tree | 12479c3ec8cedfa0ec4dda38a72023224f2b5b73 /libavformat/http.c | |
parent | f87dacb27de93f995cb18f9dcc73581ef8fc157b (diff) | |
parent | f61ce90caa909d131ea6ec205823568a38115529 (diff) | |
download | ffmpeg-82edf6727f0663601351081ca1e4fb20d1752972.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
lavr: add x86-optimized functions for mixing 1-to-2 s16p with flt coeffs
lavr: add x86-optimized functions for mixing 1-to-2 fltp with flt coeffs
Add Dolby/DPLII downmix support to libavresample
vorbisdec: replace div/mod in loop with a counter
fate: vorbis: add 5.1 surround test
rtpenc: Allow requesting H264 RTP packetization mode 0
configure: Sort the library listings in the help text alphabetically
dwt: remove variable-length arrays
RTMPT protocol support
http: Properly handle chunked transfer-encoding for replies to post data
http: Fail reading if the connection has gone away
amr: Mark an array const
amr: More space cleanup
rtpenc: Fix memory leaks in the muxer open function
Conflicts:
Changelog
configure
doc/APIchanges
libavformat/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/http.c')
-rw-r--r-- | libavformat/http.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavformat/http.c b/libavformat/http.c index 9a5ca625b0..fb4a83ad0e 100644 --- a/libavformat/http.c +++ b/libavformat/http.c @@ -352,6 +352,8 @@ static int http_read_header(URLContext *h, int *new_location) char line[1024]; int err = 0; + s->chunksize = -1; + for (;;) { if ((err = http_get_line(s, line, sizeof(line))) < 0) return err; @@ -470,7 +472,6 @@ static int http_connect(URLContext *h, const char *path, const char *local_path, s->http_code = 200; return 0; } - s->chunksize = -1; /* wait for header */ err = http_read_header(h, new_location); @@ -510,14 +511,13 @@ static int http_read(URLContext *h, uint8_t *buf, int size) HTTPContext *s = h->priv_data; int err, new_location; - if (s->end_chunked_post) { - if (!s->end_header) { - err = http_read_header(h, &new_location); - if (err < 0) - return err; - } + if (!s->hd) + return AVERROR_EOF; - return http_buf_read(h, buf, size); + if (s->end_chunked_post && !s->end_header) { + err = http_read_header(h, &new_location); + if (err < 0) + return err; } if (s->chunksize >= 0) { |