[FFmpeg-devel] [PATCH] libavformat/http: add support for headers option in listen mode
Michael Niedermayer
michael at niedermayer.cc
Thu Aug 11 01:45:07 EEST 2016
On Wed, Aug 10, 2016 at 09:18:26PM +0200, Moritz Barsnick wrote:
> Instead of silently ignoring the headers option in listen mode, use
> the provided headers.
>
> Signed-off-by: Moritz Barsnick <barsnick at gmx.net>
> ---
> libavformat/http.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/libavformat/http.c b/libavformat/http.c
> index cbeaebf..70d64af 100644
> --- a/libavformat/http.c
> +++ b/libavformat/http.c
> @@ -371,11 +371,13 @@ static int http_write_reply(URLContext* h, int status_code)
> "HTTP/1.1 %03d %s\r\n"
> "Content-Type: %s\r\n"
> "Content-Length: %"SIZE_SPECIFIER"\r\n"
> + "%s"
> "\r\n"
> "%03d %s\r\n",
> reply_code,
> reply_text,
> content_type,
> + s->headers ? s->headers : "",
> strlen(reply_text) + 6, // 3 digit status code + space + \r\n
> reply_code,
> reply_text);
these look wrogly ordered
libavformat/http.c: In function ‘http_write_reply’:
libavformat/http.c:383:18: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 7 has type ‘const char *’ [-Wformat]
libavformat/http.c:383:18: warning: format ‘%s’ expects argument of type ‘char *’, but argument 8 has type ‘size_t’ [-Wformat]
libavformat/http.c:383:18: warning: format ‘%zu’ expects argument of type ‘size_t’, but argument 7 has type ‘const char *’ [-Wformat]
libavformat/http.c:383:18: warning: format ‘%s’ expects argument of type ‘char *’, but argument 8 has type ‘size_t’ [-Wformat]
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If a bugfix only changes things apparently unrelated to the bug with no
further explanation, that is a good sign that the bugfix is wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160811/da96666b/attachment.sig>
More information about the ffmpeg-devel
mailing list