Originally committed as revision 17876 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -48,12 +48,6 @@ int av_fifo_size(AVFifoBuffer *f) · 47 unmodified lines | |||
| 48 | return (uint32_t)(f->wndx - f->rndx); | 48 | return (uint32_t)(f->wndx - f->rndx); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | #if LIBAVUTIL_VERSION_MAJOR < 50 | ||
| 52 | void av_fifo_realloc(AVFifoBuffer *f, unsigned int new_size) { | ||
| 53 | av_fifo_realloc2(f, new_size); | ||
| 54 | } | ||
| 55 | #endif | ||
| 56 | |||
| 57 | int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) { | 51 | int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) { |
| 58 | unsigned int old_size= f->end - f->buffer; | 52 | unsigned int old_size= f->end - f->buffer; |
| 59 | 53 | ||
| @@ -73,13 +67,6 @@ int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) { · 13 unmodified lines | |||
| 73 | return 0; | 67 | return 0; |
| 74 | } | 68 | } |
| 75 | 69 | ||
| 76 | #if LIBAVUTIL_VERSION_MAJOR < 50 | ||
| 77 | void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size) | ||
| 78 | { | ||
| 79 | av_fifo_generic_write(f, (void *)buf, size, NULL); | ||
| 80 | } | ||
| 81 | #endif | ||
| 82 | |||
| 83 | int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)) | 70 | int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)) |
| 84 | { | 71 | { |
| 85 | int total = size; | 72 | int total = size; |
| @@ -64,16 +64,6 @@ int av_fifo_size(AVFifoBuffer *f); · 63 unmodified lines | |||
| 64 | */ | 64 | */ |
| 65 | int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void*, int), void* dest); | 65 | int av_fifo_generic_read(AVFifoBuffer *f, int buf_size, void (*func)(void*, void*, int), void* dest); |
| 66 | 66 | ||
| 67 | #if LIBAVUTIL_VERSION_MAJOR < 50 | ||
| 68 | /** | ||
| 69 | * Writes data into an AVFifoBuffer. | ||
| 70 | * @param *f AVFifoBuffer to write to | ||
| 71 | * @param *buf data source | ||
| 72 | * @param size data size | ||
| 73 | */ | ||
| 74 | attribute_deprecated void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int size); | ||
| 75 | #endif | ||
| 76 | |||
| 77 | /** | 67 | /** |
| 78 | * Feeds data from a user-supplied callback to an AVFifoBuffer. | 68 | * Feeds data from a user-supplied callback to an AVFifoBuffer. |
| 79 | * @param *f AVFifoBuffer to write to | 69 | * @param *f AVFifoBuffer to write to |
| @@ -88,16 +78,6 @@ attribute_deprecated void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int · 8 unmodified lines | |||
| 88 | */ | 78 | */ |
| 89 | int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)); | 79 | int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)); |
| 90 | 80 | ||
| 91 | #if LIBAVUTIL_VERSION_MAJOR < 50 | ||
| 92 | /** | ||
| 93 | * Resizes an AVFifoBuffer. | ||
| 94 | * @param *f AVFifoBuffer to resize | ||
| 95 | * @param size new AVFifoBuffer size in bytes | ||
| 96 | * @see av_fifo_realloc2() | ||
| 97 | */ | ||
| 98 | attribute_deprecated void av_fifo_realloc(AVFifoBuffer *f, unsigned int size); | ||
| 99 | #endif | ||
| 100 | |||
| 101 | /** | 81 | /** |
| 102 | * Resizes an AVFifoBuffer. | 82 | * Resizes an AVFifoBuffer. |
| 103 | * @param *f AVFifoBuffer to resize | 83 | * @param *f AVFifoBuffer to resize |
| @@ -234,12 +234,6 @@ int av_lzo1x_decode(void *out, int *outlen, const void *in, int *inlen) { · 233 unmodified lines | |||
| 234 | return c.error; | 234 | return c.error; |
| 235 | } | 235 | } |
| 236 | 236 | ||
| 237 | #if LIBAVUTIL_VERSION_MAJOR < 50 | ||
| 238 | int lzo1x_decode(void *out, int *outlen, const void *in, int *inlen) { | ||
| 239 | return av_lzo1x_decode(out, outlen, in, inlen); | ||
| 240 | } | ||
| 241 | #endif | ||
| 242 | |||
| 243 | #ifdef TEST | 237 | #ifdef TEST |
| 244 | #include <stdio.h> | 238 | #include <stdio.h> |
| 245 | #include <lzo/lzo1x.h> | 239 | #include <lzo/lzo1x.h> |
| @@ -59,11 +59,3 @@ void av_rc4_crypt(AVRC4 *r, uint8_t *dst, const uint8_t *src, int count, uint8_t · 58 unmodified lines | |||
| 59 | } | 59 | } |
| 60 | r->x = x; r->y = y; | 60 | r->x = x; r->y = y; |
| 61 | } | 61 | } |
| 62 | |||
| 63 | #if LIBAVUTIL_VERSION_MAJOR < 50 | ||
| 64 | void ff_rc4_enc(const uint8_t *key, int keylen, uint8_t *data, int datalen) { | ||
| 65 | AVRC4 r; | ||
| 66 | av_rc4_init(&r, key, keylen * 8, 0); | ||
| 67 | av_rc4_crypt(&r, data, data, datalen, NULL, 0); | ||
| 68 | } | ||
| 69 | #endif | ||