[FFmpeg-cvslog] fifo: return AVERROR(ENOMEM) rather -1 in av_fifo_realloc2()

Stefano Sabatini git at videolan.org
Sun Aug 14 10:08:02 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Sat Aug 13 19:11:05 2011 +0200| [2e81bb5e92351cc88d88a1c55d21b13532131524] | committer: Stefano Sabatini

fifo: return AVERROR(ENOMEM) rather -1 in av_fifo_realloc2()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e81bb5e92351cc88d88a1c55d21b13532131524
---

 libavutil/fifo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavutil/fifo.c b/libavutil/fifo.c
index f79131a..21687ff 100644
--- a/libavutil/fifo.c
+++ b/libavutil/fifo.c
@@ -68,7 +68,7 @@ int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size)
         AVFifoBuffer *f2 = av_fifo_alloc(new_size);
 
         if (!f2)
-            return -1;
+            return AVERROR(ENOMEM);
         av_fifo_generic_read(f, f2->buffer, len, NULL);
         f2->wptr += len;
         f2->wndx += len;



More information about the ffmpeg-cvslog mailing list