fifo: return AVERROR(ENOMEM) rather -1 in av_fifo_realloc2()
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 13 Aug 2011 17:11:05 +0000 (19:11 +0200)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sat, 13 Aug 2011 23:56:28 +0000 (01:56 +0200)
libavutil/fifo.c

index f79131a..21687ff 100644 (file)
@@ -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;