On Sat, Dec 17, 2016 at 03:16:30AM -0800, Thomas Turner wrote: > Signed-off-by: Thomas Turner <thomas...@googlemail.com> > --- > libavutil/Makefile | 1 + > libavutil/tests/audio_fifo.c | 196 +++++++++++++++++++++++++++++++++++++ > tests/fate/libavutil.mak | 4 + > tests/ref/fate/audio_fifo | 228 > +++++++++++++++++++++++++++++++++++++++++++ > 4 files changed, 429 insertions(+) > create mode 100644 libavutil/tests/audio_fifo.c > create mode 100644 tests/ref/fate/audio_fifo > > diff --git a/libavutil/Makefile b/libavutil/Makefile > index 9841645..2dd91b8 100644 > --- a/libavutil/Makefile > +++ b/libavutil/Makefile > @@ -182,6 +182,7 @@ SKIPHEADERS-$(CONFIG_OPENCL) += opencl.h > TESTPROGS = adler32 \ > aes \ > atomic \ > + audio_fifo \ > avstring \ > base64 \ > blowfish \ > diff --git a/libavutil/tests/audio_fifo.c b/libavutil/tests/audio_fifo.c > new file mode 100644 > index 0000000..6dffe85 > --- /dev/null > +++ b/libavutil/tests/audio_fifo.c > @@ -0,0 +1,196 @@ > +/* > + * This file is part of FFmpeg. > + * > + * FFmpeg is free software; you can redistribute it and/or > + * modify it under the terms of the GNU Lesser General Public > + * License as published by the Free Software Foundation; either > + * version 2.1 of the License, or (at your option) any later version. > + * > + * FFmpeg is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > + * Lesser General Public License for more details. > + * > + * You should have received a copy of the GNU Lesser General Public > + * License along with FFmpeg; if not, write to the Free Software > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 > USA > + */ > + > +#include <stdlib.h> > +#include <inttypes.h> > +#include "libavutil/audio_fifo.c" > +#include "libavutil/audio_fifo.h" > +#include "libavutil/error.h" > + > +#define MAX_CHANNELS 32 > + > +#define ERROR(str) \ > + fprintf(stderr, "%s\n", str); \ > + exit(1);
this should be wraped in do{...}while(0) so that code like if (...) ERROR(str); works as expectec [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel