]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/bprint.c
Merge commit '16e6652286213014c28a9c3af70435e767d28638'
[ffmpeg] / libavutil / bprint.c
index 325ff17b625c99e14094e2025c3521de7996b879..0a0d07861b434598b1295e73a205cfd1baf34710 100644 (file)
 #include "error.h"
 #include "mem.h"
 
-#if HAVE_IO_H
-#include <io.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-
 #define av_bprint_room(buf) ((buf)->size - FFMIN((buf)->len, (buf)->size))
 #define av_bprint_is_allocated(buf) ((buf)->str != (buf)->reserved_internal_buffer)
 
@@ -312,22 +304,6 @@ void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_cha
     }
 }
 
-int av_bprint_fd_contents(AVBPrint *pb, int fd)
-{
-    int ret;
-    char buf[1024];
-    while (1) {
-        ret = read(fd, buf, sizeof(buf));
-        if (!ret)
-            return 0;
-        else if (ret < 0)
-            return AVERROR(errno);
-        av_bprint_append_data(pb, buf, ret);
-        if (!av_bprint_is_complete(pb))
-            return AVERROR(ENOMEM);
-    }
-}
-
 #ifdef TEST
 
 #undef printf