summaryrefslogtreecommitdiff
path: root/libavfilter/af_dynaudnorm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-18 10:45:12 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-18 10:45:29 +0200
commit2927b61c559fefd2da1c693c0787fcdbd7706b09 (patch)
tree2bf255d55bdfd916eca007f2d609dac020e87987 /libavfilter/af_dynaudnorm.c
parentf8e4d37983f842154b33a1f9e1352cb580d5af10 (diff)
avfilter/af_dynaudnorm: Use av_frame_get_channels()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/af_dynaudnorm.c')
-rw-r--r--libavfilter/af_dynaudnorm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c
index ba3a008e33..60d6c87b57 100644
--- a/libavfilter/af_dynaudnorm.c
+++ b/libavfilter/af_dynaudnorm.c
@@ -334,7 +334,7 @@ static double find_peak_magnitude(AVFrame *frame, int channel)
int c, i;
if (channel == -1) {
- for (c = 0; c < frame->channels; c++) {
+ for (c = 0; c < av_frame_get_channels(frame); c++) {
double *data_ptr = (double *)frame->extended_data[c];
for (i = 0; i < frame->nb_samples; i++)
@@ -356,7 +356,7 @@ static double compute_frame_rms(AVFrame *frame, int channel)
int c, i;
if (channel == -1) {
- for (c = 0; c < frame->channels; c++) {
+ for (c = 0; c < av_frame_get_channels(frame); c++) {
const double *data_ptr = (double *)frame->extended_data[c];
for (i = 0; i < frame->nb_samples; i++) {
@@ -364,7 +364,7 @@ static double compute_frame_rms(AVFrame *frame, int channel)
}
}
- rms_value /= frame->nb_samples * frame->channels;
+ rms_value /= frame->nb_samples * av_frame_get_channels(frame);
} else {
const double *data_ptr = (double *)frame->extended_data[channel];
for (i = 0; i < frame->nb_samples; i++) {