On sab, mar 08, 2014 at 01:17:17 +0200, Martin Storsjö wrote:
> On Thu, 6 Mar 2014, Alessandro Ghedini wrote:
> 
> >Original ffmpeg commit c01d1d4 by Clément Bœsch.
> >---
> >doc/protocols.texi | 3 +++
> >libavformat/http.c | 6 ++++++
> >2 files changed, 9 insertions(+)
> >
> >diff --git a/doc/protocols.texi b/doc/protocols.texi
> >index 16a6393..9e37cee 100644
> >--- a/doc/protocols.texi
> >+++ b/doc/protocols.texi
> >@@ -95,6 +95,9 @@ This protocol accepts the following options:
> >@item chunked_post
> >If set to 1 use chunked Transfer-Encoding for posts, default is 1.
> >
> >+@item content_type
> >+Request a specific content type.
> >+
> >@item headers
> >Set custom HTTP headers, can override built in default headers. The
> >value must be a string encoding the headers.
> >diff --git a/libavformat/http.c b/libavformat/http.c
> >index 5adbae6..5ca506c 100644
> >--- a/libavformat/http.c
> >+++ b/libavformat/http.c
> >@@ -50,6 +50,7 @@ typedef struct {
> >    int line_count;
> >    int http_code;
> >    int64_t chunksize;      /**< Used if "Transfer-Encoding: chunked" 
> > otherwise -1. */
> >+    char *content_type;
> >    char *user_agent;
> >    int64_t off, filesize, req_end_offset;
> >    int icy_data_read;      ///< how much data was read since last ICY 
> > metadata packet
> >@@ -85,6 +86,7 @@ typedef struct {
> >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", "request a specific content type", OFFSET(content_type), 
> >AV_OPT_TYPE_STRING, { 0 }, 0, 0, D|E },
> 
> This description seems wrong IMO. A Content-Type header in a HTTP request
> isn't to request a certain content type, but is describing the content type
> of the POST data being sent. With this changed in the option description,
> the commit message and the docs, this should be fine though.

Possibly, I may have totally misunderstood this feature -.-"

ffmpeg uses "force" instead of "require", but IMO that isn't very helpful 
either,
so maybe something like "set the content type of the POST data" would work?

Cheers

-- 
perl -E '$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse'
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to