On Thu, Oct 13, 2016 at 03:13:56PM -0700, Thomas Turner wrote: > Tested functions: av_fifo_generic_peek(), av_fifo_grow() > > Signed-off-by: Thomas Turner <thomas...@gmail.com> > --- > libavutil/tests/fifo.c | 39 +++++++++++++++++++++++++++++++++++++-- > tests/ref/fate/fifo | 43 +++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 80 insertions(+), 2 deletions(-) > > diff --git a/libavutil/tests/fifo.c b/libavutil/tests/fifo.c > index e4d7edf..63e25c8 100644 > --- a/libavutil/tests/fifo.c > +++ b/libavutil/tests/fifo.c > @@ -17,14 +17,14 @@ > */ > > #include <stdio.h> > - > +#include <stdlib.h> > #include "libavutil/fifo.h" > > int main(void) > { > /* create a FIFO buffer */ > AVFifoBuffer *fifo = av_fifo_alloc(13 * sizeof(int)); > - int i, j, n; > + int i, j, n, *p; > > /* fill data */ > for (i = 0; av_fifo_space(fifo) >= sizeof(int); i++) > @@ -46,6 +46,24 @@ int main(void) > } > printf("\n"); > > + /* generic peek at FIFO */ > + > + n = av_fifo_size(fifo); > + p = malloc(n); > + if (p == NULL) { > + fprintf(stderr, "failed to allocate memory.\n");
> + exit(-1); we use exit(1) everywhere else changed and applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel