]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/http.c
Deprecate av_fifo_realloc(). av_fifo_realloc2() should be used instead.
[ffmpeg] / libavformat / http.c
index 5bfd7368852d51b71f7e136b23bdd43ccfafb29e..fc9cac442d7ddffbe706b040c63c9e226be1138e 100644 (file)
  * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
+
+#include "libavutil/base64.h"
+#include "libavutil/avstring.h"
 #include "avformat.h"
 #include <unistd.h>
 #include "network.h"
-
-#include "base64.h"
-#include "avstring.h"
+#include "os_support.h"
 
 /* XXX: POST protocol is not completely implemented because ffmpeg uses
    only a subset of it. */
@@ -218,7 +219,7 @@ static int http_connect(URLContext *h, const char *path, const char *hoststr,
     /* send http header */
     post = h->flags & URL_WRONLY;
     auth_b64 = av_malloc(auth_b64_len);
-    av_base64_encode(auth_b64, auth_b64_len, (uint8_t *)auth, strlen(auth));
+    av_base64_encode(auth_b64, auth_b64_len, auth, strlen(auth));
     snprintf(s->buffer, sizeof(s->buffer),
              "%s %s HTTP/1.1\r\n"
              "User-Agent: %s\r\n"
@@ -246,7 +247,6 @@ static int http_connect(URLContext *h, const char *path, const char *hoststr,
     s->off = 0;
     s->filesize = -1;
     if (post) {
-        usleep(1000*1000);
         return 0;
     }