]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/http.c
avformat/avio: Add Metacube support
[ffmpeg] / libavformat / http.c
index 1fc95c768cdea739b3090e40da1a438b693d1ef8..5a0dda400c3e0d92d0da5e477eb56c80bb6515bb 100644 (file)
@@ -500,7 +500,19 @@ static int http_write_reply(URLContext* h, int status_code)
     default:
         return AVERROR(EINVAL);
     }
-    if (body) {
+    if (h->flags & AVIO_FLAG_METACUBE) {
+        s->chunked_post = 0;
+        message_len = snprintf(message, sizeof(message),
+                 "HTTP/1.1 %03d %s\r\n"
+                 "Content-Type: %s\r\n"
+                 "Content-Encoding: metacube\r\n"
+                 "%s"
+                 "\r\n",
+                 reply_code,
+                 reply_text,
+                 content_type,
+                 s->headers ? s->headers : "");
+    } else if (body) {
         s->chunked_post = 0;
         message_len = snprintf(message, sizeof(message),
                  "HTTP/1.1 %03d %s\r\n"