diff options
author | Muhammad Faiz <mfcc64@gmail.com> | 2017-04-22 15:59:09 +0700 |
---|---|---|
committer | Muhammad Faiz <mfcc64@gmail.com> | 2017-04-23 14:47:54 +0700 |
commit | cdd3048134b8b032b69d3c076d73d24e329dc9ba (patch) | |
tree | 5a23d1b6d10204843325d71c93965a277a9d7b88 /tests/api/api-flac-test.c | |
parent | 327a1c0dee05efff74b1fe18144a6543c44975fa (diff) | |
download | ffmpeg-cdd3048134b8b032b69d3c076d73d24e329dc9ba.tar.gz |
tests: do not use AVFrame accessor
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
Diffstat (limited to 'tests/api/api-flac-test.c')
-rw-r--r-- | tests/api/api-flac-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/api/api-flac-test.c b/tests/api/api-flac-test.c index 7b480594b7..c5a37f03e1 100644 --- a/tests/api/api-flac-test.c +++ b/tests/api/api-flac-test.c @@ -156,7 +156,7 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx, generate_raw_frame((uint16_t*)(in_frame->data[0]), i, enc_ctx->sample_rate, enc_ctx->channels, enc_ctx->frame_size); - in_frame_bytes = in_frame->nb_samples * av_frame_get_channels(in_frame) * sizeof(uint16_t); + in_frame_bytes = in_frame->nb_samples * in_frame->channels * sizeof(uint16_t); if (in_frame_bytes > in_frame->linesize[0]) { av_log(NULL, AV_LOG_ERROR, "Incorrect value of input frame linesize\n"); return 1; @@ -197,7 +197,7 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx, av_log(NULL, AV_LOG_ERROR, "Error frames before and after decoding has different sample format\n"); return AVERROR_UNKNOWN; } - out_frame_bytes = out_frame->nb_samples * av_frame_get_channels(out_frame) * sizeof(uint16_t); + out_frame_bytes = out_frame->nb_samples * out_frame->channels * sizeof(uint16_t); if (out_frame_bytes > out_frame->linesize[0]) { av_log(NULL, AV_LOG_ERROR, "Incorrect value of output frame linesize\n"); return 1; |