diff mbox series

[FFmpeg-devel,v2,1/6] libavformat/http: expose actual Location header value

Message ID 74b2eb04-6ec8-4e20-930a-026793793186@nativewaves.com
State New
Headers show
Series WebRTC sub-second live streaming support | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Riedl Nov. 7, 2023, 2:12 p.m. UTC
This is needed for (de)muxers which need to access the Location header as transmitted when no redirection happend.

Signed-off-by: Michael Riedl <michael.riedl@nativewaves.com>
---
 libavformat/http.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/libavformat/http.c b/libavformat/http.c
index c0fe7c36d91..27f9c8e3000 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -166,6 +166,7 @@  static const AVOption options[] = {
     { "basic", "HTTP basic authentication", 0, AV_OPT_TYPE_CONST, { .i64 = HTTP_AUTH_BASIC }, 0, 0, D | E, "auth_type"},
     { "send_expect_100", "Force sending an Expect: 100-continue header for POST", OFFSET(send_expect_100), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, E },
     { "location", "The actual location of the data received", OFFSET(location), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E },
+    { "new_location", "The location header value of the data received", OFFSET(new_location), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D },
     { "offset", "initial byte offset", OFFSET(off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D },
     { "end_offset", "try to limit the request to bytes preceding this offset", OFFSET(end_off), AV_OPT_TYPE_INT64, { .i64 = 0 }, 0, INT64_MAX, D },
     { "method", "Override the HTTP method or set the expected HTTP method from a client", OFFSET(method), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, D | E },