summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-13 15:56:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-15 21:49:56 +0200
commit95144729045fe00130f6b3547c04d40d1b48b157 (patch)
tree55d4259547dde6f7116bde0fef3530fb209895dc /libavutil
parent7a15c22c5f76c1e5261b9ac023f95f418f8459d8 (diff)
avutil & avdevice: remove av_bprint_fd_contents()
MSVC does not allow passing file pointers between libs This API can thus not work with MSVC and as it was very recently added and its it was in no release its removial should not cause any problems A better API will be implemented, but its not finished yet, this revert is to avoid potentially blocking the release Found-by: Hendrik Leppkes <h.leppkes@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/bprint.c24
-rw-r--r--libavutil/bprint.h7
2 files changed, 0 insertions, 31 deletions
diff --git a/libavutil/bprint.c b/libavutil/bprint.c
index 325ff17b62..0a0d07861b 100644
--- a/libavutil/bprint.c
+++ b/libavutil/bprint.c
@@ -30,14 +30,6 @@
#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
diff --git a/libavutil/bprint.h b/libavutil/bprint.h
index 1b23b9fe3c..839ec1ec0d 100644
--- a/libavutil/bprint.h
+++ b/libavutil/bprint.h
@@ -213,11 +213,4 @@ int av_bprint_finalize(AVBPrint *buf, char **ret_str);
void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars,
enum AVEscapeMode mode, int flags);
-/**
- * Read contents of fd into print buffer up to EOF.
- *
- * @return 0 for success, error code otherwise
- */
-int av_bprint_fd_contents(AVBPrint *pb, int fd);
-
#endif /* AVUTIL_BPRINT_H */