[FFmpeg-cvslog] tests/api-flac-test: Rename NUMBER_OF_FRAMES as NUMBER_OF_AUDIO_FRAMES.

Carl Eugen Hoyos git at videolan.org
Tue Dec 11 20:14:15 EET 2018


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Mon Dec  3 01:14:24 2018 +0100| [464aa60eb5e510c5ab406f6e63951353df703c41] | committer: 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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=464aa60eb5e510c5ab406f6e63951353df703c41
---

 tests/api/api-flac-test.c | 10 +++++-----
 1 file 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;
     }



More information about the ffmpeg-cvslog mailing list