From 6af050d7d0c3c73f3d62115152db82ebd2dc5d57 Mon Sep 17 00:00:00 2001 From: Muhammad Faiz Date: Sat, 22 Apr 2017 15:57:18 +0700 Subject: avfilter: do not use AVFrame accessor Reviewed-by: wm4 Signed-off-by: Muhammad Faiz --- libavfilter/af_dynaudnorm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavfilter/af_dynaudnorm.c') diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c index aa5b28e647..d4ebd96590 100644 --- a/libavfilter/af_dynaudnorm.c +++ b/libavfilter/af_dynaudnorm.c @@ -358,7 +358,7 @@ static double find_peak_magnitude(AVFrame *frame, int channel) int c, i; if (channel == -1) { - for (c = 0; c < av_frame_get_channels(frame); c++) { + for (c = 0; c < frame->channels; c++) { double *data_ptr = (double *)frame->extended_data[c]; for (i = 0; i < frame->nb_samples; i++) @@ -380,7 +380,7 @@ static double compute_frame_rms(AVFrame *frame, int channel) int c, i; if (channel == -1) { - for (c = 0; c < av_frame_get_channels(frame); c++) { + for (c = 0; c < frame->channels; c++) { const double *data_ptr = (double *)frame->extended_data[c]; for (i = 0; i < frame->nb_samples; i++) { @@ -388,7 +388,7 @@ static double compute_frame_rms(AVFrame *frame, int channel) } } - rms_value /= frame->nb_samples * av_frame_get_channels(frame); + rms_value /= frame->nb_samples * frame->channels; } else { const double *data_ptr = (double *)frame->extended_data[channel]; for (i = 0; i < frame->nb_samples; i++) { -- cgit v1.2.3