Browse Source

Deprecate av_fifo_realloc(). av_fifo_realloc2() should be used instead.

Originally committed as revision 14855 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Stefano Sabatini 17 years ago
parent
commit
e8e2b2ef17
2 changed files with 5 additions and 1 deletions
  1. +2
    -0
      libavutil/fifo.c
  2. +3
    -1
      libavutil/fifo.h

+ 2
- 0
libavutil/fifo.c View File

@@ -51,12 +51,14 @@ int av_fifo_read(AVFifoBuffer *f, uint8_t *buf, int buf_size)
return av_fifo_generic_read(f, buf_size, NULL, buf);
}

#if LIBAVUTIL_VERSION_MAJOR < 50
/**
* Resizes a FIFO.
*/
void av_fifo_realloc(AVFifoBuffer *f, unsigned int new_size) {
av_fifo_realloc2(f, new_size);
}
#endif

int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) {
unsigned int old_size= f->end - f->buffer;


+ 3
- 1
libavutil/fifo.h View File

@@ -93,13 +93,15 @@ attribute_deprecated void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int
*/
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));

#if LIBAVUTIL_VERSION_MAJOR < 50
/**
* Resizes an AVFifoBuffer.
* @param *f AVFifoBuffer to resize
* @param size new AVFifoBuffer size in bytes
* @see av_fifo_realloc2()
*/
void av_fifo_realloc(AVFifoBuffer *f, unsigned int size);
attribute_deprecated void av_fifo_realloc(AVFifoBuffer *f, unsigned int size);
#endif

/**
* Resizes an AVFifoBuffer.


Loading…
Cancel
Save