Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-16 06:38:07 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-03-16 06:38:07 +0400
commit6a10263f163af66f9e143cb0ba206cb99e78e605 (patch)
treec4fcd34ea36f51fc1843d70789ff9e48f5d4ea69 /libavformat
parentbcc6429c01a8d244ee0f45f045ab00edf6391b7e (diff)
parent09dca5106698871920328ae8041d1437ce3cff43 (diff)
Merge commit '09dca5106698871920328ae8041d1437ce3cff43' into release/2.2
* commit '09dca5106698871920328ae8041d1437ce3cff43': http: Support setting custom User-Agent Conflicts: doc/protocols.texi libavformat/http.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/http.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/http.c b/libavformat/http.c
index 81d33172c0..769568d50d 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -52,13 +52,13 @@ typedef struct {
/* Used if "Transfer-Encoding: chunked" otherwise -1. */
int64_t chunksize;
char *content_type;
- char *user_agent;
int64_t off, filesize, req_end_offset;
char *location;
HTTPAuthState auth_state;
HTTPAuthState proxy_auth_state;
char *headers;
char *mime_type;
+ char *user_agent;
/* Set if the server correctly handles Connection: close and will close
* the connection after feeding us the content. */
int willclose;
@@ -100,6 +100,7 @@ static const AVOption options[] = {
{"chunked_post", "use chunked transfer-encoding for posts", OFFSET(chunked_post), AV_OPT_TYPE_INT, {.i64 = 1}, 0, 1, E },
{"headers", "set custom HTTP headers, can override built in default headers", OFFSET(headers), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
{"content_type", "force a content type", OFFSET(content_type), AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
+{"user_agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D },
{"user-agent", "override User-Agent header", OFFSET(user_agent), AV_OPT_TYPE_STRING, {.str = DEFAULT_USER_AGENT}, 0, 0, D },
{"multiple_requests", "use persistent connections", OFFSET(multiple_requests), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, D|E },
{"post_data", "set custom HTTP post data", OFFSET(post_data), AV_OPT_TYPE_BINARY, .flags = D|E },