[FFmpeg-devel] [PATCH] lavf/http: Add 301 and 503 error codes to http_write_reply()

Stephan Holljes klaxa1337 at googlemail.com
Wed Aug 19 18:14:19 CEST 2015


---
 libavformat/http.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavformat/http.c b/libavformat/http.c
index a136918..4dbef3f 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -348,11 +348,19 @@ static int http_write_reply(URLContext* h, int status_code)
         reply_text = "OK";
         content_type = "application/octet-stream";
         break;
+    case 301:
+        reply_code = 301;
+        reply_text = "Moved Permanently";
+        break;
     case AVERROR_HTTP_SERVER_ERROR:
     case 500:
         reply_code = 500;
         reply_text = "Internal server error";
         break;
+    case 503:
+        reply_code = 503;
+        reply_text = "Service Unavailable";
+        break;
     default:
         return AVERROR(EINVAL);
     }
-- 
2.1.0



More information about the ffmpeg-devel mailing list