Commit 464aa60e authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

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.
parent dd7d6034
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "libavutil/common.h" #include "libavutil/common.h"
#include "libavutil/samplefmt.h" #include "libavutil/samplefmt.h"
#define NUMBER_OF_FRAMES 200 #define NUMBER_OF_AUDIO_FRAMES 200
#define NAME_BUFF_SIZE 100 #define NAME_BUFF_SIZE 100
/* generate i-th frame of test audio */ /* generate i-th frame of test audio */
...@@ -137,19 +137,19 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx, ...@@ -137,19 +137,19 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx,
return AVERROR(ENOMEM); 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) { if (!raw_in) {
av_log(NULL, AV_LOG_ERROR, "Can't allocate memory for raw_in\n"); av_log(NULL, AV_LOG_ERROR, "Can't allocate memory for raw_in\n");
return AVERROR(ENOMEM); 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) { if (!raw_out) {
av_log(NULL, AV_LOG_ERROR, "Can't allocate memory for raw_out\n"); av_log(NULL, AV_LOG_ERROR, "Can't allocate memory for raw_out\n");
return AVERROR(ENOMEM); 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); av_init_packet(&enc_pkt);
enc_pkt.data = NULL; enc_pkt.data = NULL;
enc_pkt.size = 0; enc_pkt.size = 0;
...@@ -209,7 +209,7 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx, ...@@ -209,7 +209,7 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx,
av_packet_unref(&enc_pkt); 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"); av_log(NULL, AV_LOG_ERROR, "Output differs\n");
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment