]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/fifo.h
Add graceful error handling to avcodec_get_pix_fmt_name() and avcodec_get_pix_fmt().
[ffmpeg] / libavutil / fifo.h
index fccb322dbfa615cdfb4bed1088e8dd3f13755065..6533be921de5e30c4bf5f8207b7981040991b6ce 100644 (file)
@@ -25,6 +25,7 @@
 #define FFMPEG_FIFO_H
 
 #include <stdint.h>
+#include "common.h"
 
 typedef struct AVFifoBuffer {
     uint8_t *buffer;
@@ -37,7 +38,7 @@ typedef struct AVFifoBuffer {
  * @param size of FIFO
  * @return <0 for failure >=0 otherwise
  */
-int av_fifo_init(AVFifoBuffer *f, int size);
+int av_fifo_init(AVFifoBuffer *f, unsigned int size);
 
 /**
  * Frees an AVFifoBuffer.
@@ -81,16 +82,16 @@ attribute_deprecated void av_fifo_write(AVFifoBuffer *f, const uint8_t *buf, int
 /**
  * Feeds data from a user supplied callback to an AVFifoBuffer.
  * @param *f AVFifoBuffer to write to
- * @param *buf data source
+ * @param *src data source
  * @param size number of bytes to write
- * @param *func generic write function. First parameter is buf,
+ * @param *func generic write function. First parameter is src,
  * second is dest_buf, third is dest_buf_size.
  * func must return the number of bytes written to dest_buf, or <= 0 to
  * indicate no more data available to write.
- * If func is NULL, buf is interpreted as a simple byte array for source data.
+ * If func is NULL, src is interpreted as a simple byte array for source data.
  * @return the number of bytes written to the fifo.
  */
-int av_fifo_generic_write(AVFifoBuffer *f, void *buf, int size, int (*func)(void*, void*, int));
+int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int));
 
 /**
  * Resizes an AVFifoBuffer.