From 136865413c04760aeeda6079002bc3c1f9ae230a Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Fri, 24 Sep 2021 02:27:17 +0200 Subject: avcodec/tests/utils: Rename to avcodec The current name comes from a time in which libavcodec/utils.c contained the whole core of libavcodec. Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 4 ++-- libavcodec/tests/avcodec.c | 37 +++++++++++++++++++++++++++++++++++++ libavcodec/tests/utils.c | 37 ------------------------------------- 3 files changed, 39 insertions(+), 39 deletions(-) create mode 100644 libavcodec/tests/avcodec.c delete mode 100644 libavcodec/tests/utils.c (limited to 'libavcodec') diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 11873eecae..8012b69f61 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -1209,13 +1209,13 @@ SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h -TESTPROGS = avpacket \ +TESTPROGS = avcodec \ + avpacket \ celp_math \ codec_desc \ htmlsubtitles \ jpeg2000dwt \ mathops \ - utils \ TESTPROGS-$(CONFIG_CABAC) += cabac TESTPROGS-$(CONFIG_DCT) += avfft diff --git a/libavcodec/tests/avcodec.c b/libavcodec/tests/avcodec.c new file mode 100644 index 0000000000..9232647ff0 --- /dev/null +++ b/libavcodec/tests/avcodec.c @@ -0,0 +1,37 @@ +/* + * 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 "libavcodec/avcodec.h" + +int main(void){ + void *iter = NULL; + const AVCodec *codec = NULL; + int ret = 0; + + while (codec = av_codec_iterate(&iter)) { + if (av_codec_is_encoder(codec)) { + if (codec->type == AVMEDIA_TYPE_AUDIO) { + if (!codec->sample_fmts) { + av_log(NULL, AV_LOG_FATAL, "Encoder %s is missing the sample_fmts field\n", codec->name); + ret = 1; + } + } + } + } + return ret; +} diff --git a/libavcodec/tests/utils.c b/libavcodec/tests/utils.c deleted file mode 100644 index 9232647ff0..0000000000 --- a/libavcodec/tests/utils.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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 "libavcodec/avcodec.h" - -int main(void){ - void *iter = NULL; - const AVCodec *codec = NULL; - int ret = 0; - - while (codec = av_codec_iterate(&iter)) { - if (av_codec_is_encoder(codec)) { - if (codec->type == AVMEDIA_TYPE_AUDIO) { - if (!codec->sample_fmts) { - av_log(NULL, AV_LOG_FATAL, "Encoder %s is missing the sample_fmts field\n", codec->name); - ret = 1; - } - } - } - } - return ret; -} -- cgit v1.2.3