]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avio.c
id3v2: Match PIC mimetype/format case-insensitively
[ffmpeg] / libavformat / avio.c
index 067f2958e02d79a5921ac6b592802877f576f259..5acaf30e9089def6727ec9283c65c364c53a1ad7 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <unistd.h>
-
 #include "libavutil/avstring.h"
 #include "libavutil/dict.h"
 #include "libavutil/opt.h"
+#include "libavutil/time.h"
 #include "os_support.h"
 #include "avformat.h"
 #if CONFIG_NETWORK
@@ -237,7 +236,7 @@ static inline int retry_transfer_wrapper(URLContext *h, unsigned char *buf, int
             if (fast_retries)
                 fast_retries--;
             else
-                usleep(1000);
+                av_usleep(1000);
         } else if (ret < 1)
             return ret < 0 ? ret : len;
         if (ret)
@@ -345,6 +344,13 @@ int ffurl_get_file_handle(URLContext *h)
     return h->prot->url_get_file_handle(h);
 }
 
+int ffurl_shutdown(URLContext *h, int flags)
+{
+    if (!h->prot->url_shutdown)
+        return AVERROR(EINVAL);
+    return h->prot->url_shutdown(h, flags);
+}
+
 int ff_check_interrupt(AVIOInterruptCB *cb)
 {
     int ret;
@@ -352,4 +358,3 @@ int ff_check_interrupt(AVIOInterruptCB *cb)
         return ret;
     return 0;
 }
-