[FFmpeg-cvslog] avcodec: Add utils test
Michael Niedermayer
git at videolan.org
Mon Feb 29 21:55:15 CET 2016
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Feb 28 12:35:33 2016 +0100| [0be09f54fb2a8f9070f29918754280154fbbc34d] | committer: Michael Niedermayer
avcodec: Add utils test
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0be09f54fb2a8f9070f29918754280154fbbc34d
---
libavcodec/Makefile | 1 +
libavcodec/utils.c | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 5389725..667e257 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -952,6 +952,7 @@ TESTPROGS = imgconvert \
jpeg2000dwt \
mathops \
options \
+ utils \
avfft \
TESTPROGS-$(CONFIG_CABAC) += cabac
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index b1ba51e..f435588 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3679,3 +3679,23 @@ AVCPBProperties *ff_add_cpb_side_data(AVCodecContext *avctx)
return props;
}
+
+#ifdef TEST
+int main(void){
+ avcodec_register_all();
+ AVCodec *codec = NULL;
+ int ret = 0;
+
+ while (codec = av_codec_next(codec)) {
+ 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;
+}
+#endif /* TEST */
More information about the ffmpeg-cvslog
mailing list