[FFmpeg-cvslog] r23683 - trunk/libavformat/http.c
mstorsjo
subversion
Mon Jun 21 21:02:05 CEST 2010
Author: mstorsjo
Date: Mon Jun 21 21:02:05 2010
New Revision: 23683
Log:
HTTP: Compact the code for writing chunked post data
Modified:
trunk/libavformat/http.c
Modified: trunk/libavformat/http.c
==============================================================================
--- trunk/libavformat/http.c Mon Jun 21 21:01:32 2010 (r23682)
+++ trunk/libavformat/http.c Mon Jun 21 21:02:05 2010 (r23683)
@@ -440,13 +440,10 @@ static int http_write(URLContext *h, con
if (size > 0) {
/* upload data using chunked encoding */
snprintf(temp, sizeof(temp), "%x\r\n", size);
- if ((ret = url_write(s->hd, temp, strlen(temp))) < 0)
- return ret;
-
- if ((ret = url_write(s->hd, buf, size)) < 0)
- return ret;
- if ((ret = url_write(s->hd, crlf, sizeof(crlf) - 1)) < 0)
+ if ((ret = url_write(s->hd, temp, strlen(temp))) < 0 ||
+ (ret = url_write(s->hd, buf, size)) < 0 ||
+ (ret = url_write(s->hd, crlf, sizeof(crlf) - 1)) < 0)
return ret;
}
return size;
More information about the ffmpeg-cvslog
mailing list