tests/api-flac-test: reindent

This commit is contained in:
Anton Khirnov 2021-01-27 13:38:00 +01:00
parent f942e14884
commit 8369a2873c

View File

@ -201,27 +201,27 @@ static int run_test(AVCodec *enc, AVCodec *dec, AVCodecContext *enc_ctx,
return result; return result;
} }
if (in_frame->nb_samples != out_frame->nb_samples) { if (in_frame->nb_samples != out_frame->nb_samples) {
av_log(NULL, AV_LOG_ERROR, "Error frames before and after decoding has different number of samples\n"); av_log(NULL, AV_LOG_ERROR, "Error frames before and after decoding has different number of samples\n");
return AVERROR_UNKNOWN; return AVERROR_UNKNOWN;
} }
if (in_frame->channel_layout != out_frame->channel_layout) { if (in_frame->channel_layout != out_frame->channel_layout) {
av_log(NULL, AV_LOG_ERROR, "Error frames before and after decoding has different channel layout\n"); av_log(NULL, AV_LOG_ERROR, "Error frames before and after decoding has different channel layout\n");
return AVERROR_UNKNOWN; return AVERROR_UNKNOWN;
} }
if (in_frame->format != out_frame->format) { if (in_frame->format != out_frame->format) {
av_log(NULL, AV_LOG_ERROR, "Error frames before and after decoding has different sample format\n"); av_log(NULL, AV_LOG_ERROR, "Error frames before and after decoding has different sample format\n");
return AVERROR_UNKNOWN; return AVERROR_UNKNOWN;
} }
out_frame_bytes = out_frame->nb_samples * out_frame->channels * sizeof(uint16_t); out_frame_bytes = out_frame->nb_samples * out_frame->channels * sizeof(uint16_t);
if (out_frame_bytes > out_frame->linesize[0]) { if (out_frame_bytes > out_frame->linesize[0]) {
av_log(NULL, AV_LOG_ERROR, "Incorrect value of output frame linesize\n"); av_log(NULL, AV_LOG_ERROR, "Incorrect value of output frame linesize\n");
return 1; return 1;
} }
memcpy(raw_out + out_offset, out_frame->data[0], out_frame_bytes); memcpy(raw_out + out_offset, out_frame->data[0], out_frame_bytes);
out_offset += out_frame_bytes; out_offset += out_frame_bytes;
} }
} }