diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-04-12 21:17:26 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-04-19 19:04:28 +0200 |
commit | 490a022d86ef1c506a79744c5a95368af356fc69 (patch) | |
tree | 411f974cc5804db851793d62f6c9614ca2cee2cb | |
parent | 9e5c62c97fc0a6ee5764ec69cc6c237b5f70026b (diff) | |
download | ffmpeg-490a022d86ef1c506a79744c5a95368af356fc69.tar.gz |
lavu: remove misc disabled cruft
-rw-r--r-- | libavutil/error.h | 13 | ||||
-rw-r--r-- | libavutil/file.c | 3 | ||||
-rw-r--r-- | libavutil/log.c | 5 | ||||
-rw-r--r-- | libavutil/mem.c | 6 | ||||
-rw-r--r-- | libavutil/mem.h | 14 |
5 files changed, 8 insertions, 33 deletions
diff --git a/libavutil/error.h b/libavutil/error.h index 8c83ecde77..33332b18c4 100644 --- a/libavutil/error.h +++ b/libavutil/error.h @@ -37,25 +37,12 @@ #define AVUNERROR(e) (e) #endif -#if LIBAVUTIL_VERSION_MAJOR < 51 -#define AVERROR_INVALIDDATA AVERROR(EINVAL) ///< Invalid data found when processing input -#define AVERROR_IO AVERROR(EIO) ///< I/O error -#define AVERROR_NOENT AVERROR(ENOENT) ///< No such file or directory -#define AVERROR_NOFMT AVERROR(EILSEQ) ///< Unknown format -#define AVERROR_NOMEM AVERROR(ENOMEM) ///< Not enough memory -#define AVERROR_NOTSUPP AVERROR(ENOSYS) ///< Operation not supported -#define AVERROR_NUMEXPECTED AVERROR(EDOM) ///< Number syntax expected in filename -#define AVERROR_UNKNOWN AVERROR(EINVAL) ///< Unknown error -#endif - #define AVERROR_EOF AVERROR(EPIPE) ///< End of file #define AVERROR_PATCHWELCOME (-MKTAG('P','A','W','E')) ///< Not yet implemented in Libav, patches welcome -#if LIBAVUTIL_VERSION_MAJOR > 50 #define AVERROR_INVALIDDATA (-MKTAG('I','N','D','A')) ///< Invalid data found when processing input #define AVERROR_NUMEXPECTED (-MKTAG('N','U','E','X')) ///< Number syntax expected in filename -#endif #define AVERROR_DEMUXER_NOT_FOUND (-MKTAG(0xF8,'D','E','M')) ///< Demuxer not found #define AVERROR_MUXER_NOT_FOUND (-MKTAG(0xF8,'M','U','X')) ///< Muxer not found diff --git a/libavutil/file.c b/libavutil/file.c index 757e73bafb..3dcce7c2f8 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -47,7 +47,6 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, av_unused void *ptr; off_t off_size; char errbuf[128]; - size_t max_size = HAVE_MMAP ? SIZE_MAX : FF_INTERNAL_MEM_TYPE_MAX_VALUE; *bufptr = NULL; if (fd < 0) { @@ -66,7 +65,7 @@ int av_file_map(const char *filename, uint8_t **bufptr, size_t *size, } off_size = st.st_size; - if (off_size > max_size) { + if (off_size > SIZE_MAX) { av_log(&file_log_ctx, AV_LOG_ERROR, "File size for file '%s' is too big\n", filename); close(fd); diff --git a/libavutil/log.c b/libavutil/log.c index 3b8244889f..72d2b914bd 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -29,10 +29,7 @@ #include "avutil.h" #include "log.h" -#if LIBAVUTIL_VERSION_MAJOR > 50 -static -#endif -int av_log_level = AV_LOG_INFO; +static int av_log_level = AV_LOG_INFO; static int flags; #if defined(_WIN32) && !defined(__MINGW32CE__) diff --git a/libavutil/mem.c b/libavutil/mem.c index 7a54bd0f7e..2aef9b0a1b 100644 --- a/libavutil/mem.c +++ b/libavutil/mem.c @@ -61,7 +61,7 @@ void free(void *ptr); memory allocator. You do not need to suppress this file because the linker will do it automatically. */ -void *av_malloc(FF_INTERNAL_MEM_TYPE size) +void *av_malloc(size_t size) { void *ptr = NULL; #if CONFIG_MEMALIGN_HACK @@ -116,7 +116,7 @@ void *av_malloc(FF_INTERNAL_MEM_TYPE size) return ptr; } -void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size) +void *av_realloc(void *ptr, size_t size) { #if CONFIG_MEMALIGN_HACK int diff; @@ -153,7 +153,7 @@ void av_freep(void *arg) *ptr = NULL; } -void *av_mallocz(FF_INTERNAL_MEM_TYPE size) +void *av_mallocz(size_t size) { void *ptr = av_malloc(size); if (ptr) diff --git a/libavutil/mem.h b/libavutil/mem.h index f52777b071..5dea492021 100644 --- a/libavutil/mem.h +++ b/libavutil/mem.h @@ -62,14 +62,6 @@ #define av_alloc_size(n) #endif -#if LIBAVUTIL_VERSION_MAJOR < 51 -# define FF_INTERNAL_MEM_TYPE unsigned int -# define FF_INTERNAL_MEM_TYPE_MAX_VALUE UINT_MAX -#else -# define FF_INTERNAL_MEM_TYPE size_t -# define FF_INTERNAL_MEM_TYPE_MAX_VALUE SIZE_MAX -#endif - /** * Allocate a block of size bytes with alignment suitable for all * memory accesses (including vectors if available on the CPU). @@ -78,7 +70,7 @@ * be allocated. * @see av_mallocz() */ -void *av_malloc(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1); +void *av_malloc(size_t size) av_malloc_attrib av_alloc_size(1); /** * Allocate or reallocate a block of memory. @@ -92,7 +84,7 @@ void *av_malloc(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1); * cannot be reallocated or the function is used to free the memory block. * @see av_fast_realloc() */ -void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size) av_alloc_size(2); +void *av_realloc(void *ptr, size_t size) av_alloc_size(2); /** * Free a memory block which has been allocated with av_malloc(z)() or @@ -112,7 +104,7 @@ void av_free(void *ptr); * @return Pointer to the allocated block, NULL if it cannot be allocated. * @see av_malloc() */ -void *av_mallocz(FF_INTERNAL_MEM_TYPE size) av_malloc_attrib av_alloc_size(1); +void *av_mallocz(size_t size) av_malloc_attrib av_alloc_size(1); /** * Duplicate the string s. |