summaryrefslogtreecommitdiff
path: root/tests/api
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-12-03 01:14:24 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-12-11 19:14:02 +0100
commit464aa60eb5e510c5ab406f6e63951353df703c41 (patch)
tree1622a5dfc2ab9ed5a1812b6556582bf4657dd5e5 /tests/api
parentdd7d6034f1fe94e64b1117e80c48c514447af7d3 (diff)
downloadffmpeg-464aa60eb5e510c5ab406f6e63951353df703c41.tar.gz
tests/api-flac-test: Rename NUMBER_OF_FRAMES as NUMBER_OF_AUDIO_FRAMES.
In system header /usr/include/sys/mstsave.h, aix defines NUMBER_OF_FRAMES, causing redefinition warnings.
Diffstat (limited to 'tests/api')
-rw-r--r--tests/api/api-flac-test.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/api/api-flac-test.c b/tests/api/api-flac-test.c
index 2e9081266f..e8e8cbf1e7 100644
--- a/tests/api/api-flac-test.c
+++ b/tests/api/api-flac-test.c
@@ -31,7 +31,7 @@
#include "libavutil/common.h"
#include "libavutil/samplefmt.h"
-#define NUMBER_OF_FRAMES 200
+#define NUMBER_OF_AUDIO_FRAMES 200
#define NAME_BUFF_SIZE 100
/* generate i-th frame of test audio */
@@ -137,19 +137,19 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx,
return AVERROR(ENOMEM);
}
- raw_in = av_malloc(in_frame->linesize[0] * NUMBER_OF_FRAMES);
+ raw_in = av_malloc(in_frame->linesize[0] * NUMBER_OF_AUDIO_FRAMES);
if (!raw_in) {
av_log(NULL, AV_LOG_ERROR, "Can't allocate memory for raw_in\n");
return AVERROR(ENOMEM);
}
- raw_out = av_malloc(in_frame->linesize[0] * NUMBER_OF_FRAMES);
+ raw_out = av_malloc(in_frame->linesize[0] * NUMBER_OF_AUDIO_FRAMES);
if (!raw_out) {
av_log(NULL, AV_LOG_ERROR, "Can't allocate memory for raw_out\n");
return AVERROR(ENOMEM);
}
- for (i = 0; i < NUMBER_OF_FRAMES; i++) {
+ for (i = 0; i < NUMBER_OF_AUDIO_FRAMES; i++) {
av_init_packet(&enc_pkt);
enc_pkt.data = NULL;
enc_pkt.size = 0;
@@ -209,7 +209,7 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx,
av_packet_unref(&enc_pkt);
}
- if (memcmp(raw_in, raw_out, out_frame_bytes * NUMBER_OF_FRAMES) != 0) {
+ if (memcmp(raw_in, raw_out, out_frame_bytes * NUMBER_OF_AUDIO_FRAMES) != 0) {
av_log(NULL, AV_LOG_ERROR, "Output differs\n");
return 1;
}