[2/4] rtsp: Set http custom headers via the AVOption

Message ID 1320659572-8118-2-git-send-email-martin@martin.st
State Committed
Commit 196bf28c5d858e1594f9677fcab8677aca17ad33
Headers show

Commit Message

Martin Storsjö Nov. 7, 2011, 9:52 a.m.
---
 libavformat/rtsp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Anton Khirnov Nov. 8, 2011, 5:51 p.m. | #1
On Mon,  7 Nov 2011 11:52:50 +0200, Martin Storsjö <martin@martin.st> wrote:
> ---
>  libavformat/rtsp.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 

Looks fine.

Patch

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 84cf922..862582a 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1462,7 +1462,7 @@  redirect:
                  "Pragma: no-cache\r\n"
                  "Cache-Control: no-cache\r\n",
                  sessioncookie);
-        ff_http_set_headers(rt->rtsp_hd, headers);
+        av_opt_set(rt->rtsp_hd->priv_data, "headers", headers, 0);
 
         /* complete the connection */
         if (ffurl_connect(rt->rtsp_hd)) {
@@ -1485,7 +1485,7 @@  redirect:
                  "Content-Length: 32767\r\n"
                  "Expires: Sun, 9 Jan 1972 00:00:00 GMT\r\n",
                  sessioncookie);
-        ff_http_set_headers(rt->rtsp_hd_out, headers);
+        av_opt_set(rt->rtsp_hd_out->priv_data, "headers", headers, 0);
         av_opt_set(rt->rtsp_hd_out->priv_data, "chunksize", "-1", 0);
 
         /* Initialize the authentication state for the POST session. The HTTP