avfilter/af_aecho & af_compand: use extended_data

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2013-09-15 12:10:12 +00:00
parent a06e20888d
commit 60abdb6c17
2 changed files with 7 additions and 7 deletions

View File

@ -282,7 +282,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
av_frame_copy_props(out_frame, frame);
}
s->echo_samples(s, s->delayptrs, frame->data, out_frame->data,
s->echo_samples(s, s->delayptrs, frame->extended_data, out_frame->extended_data,
frame->nb_samples, inlink->channels);
if (frame != out_frame)
@ -314,7 +314,7 @@ static int request_frame(AVFilterLink *outlink)
outlink->channels,
frame->format);
s->echo_samples(s, s->delayptrs, frame->data, frame->data,
s->echo_samples(s, s->delayptrs, frame->extended_data, frame->extended_data,
frame->nb_samples, outlink->channels);
frame->pts = s->next_pts;

View File

@ -190,8 +190,8 @@ static int compand_nodelay(AVFilterContext *ctx, AVFrame *frame)
}
for (chan = 0; chan < channels; chan++) {
const double *src = (double *)frame->data[chan];
double *dst = (double *)out_frame->data[chan];
const double *src = (double *)frame->extended_data[chan];
double *dst = (double *)out_frame->extended_data[chan];
ChanParam *cp = &s->channels[chan];
for (i = 0; i < nb_samples; i++) {
@ -221,7 +221,7 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
av_assert1(channels > 0); /* would corrupt delay_count and delay_index */
for (chan = 0; chan < channels; chan++) {
const double *src = (double *)frame->data[chan];
const double *src = (double *)frame->extended_data[chan];
double *dbuf = (double *)s->delayptrs[chan];
ChanParam *cp = &s->channels[chan];
double *dst;
@ -242,7 +242,7 @@ static int compand_delay(AVFilterContext *ctx, AVFrame *frame)
s->pts += av_rescale_q(nb_samples - i, (AVRational){1, inlink->sample_rate}, inlink->time_base);
}
dst = (double *)out_frame->data[chan];
dst = (double *)out_frame->extended_data[chan];
dst[oindex++] = av_clipd(dbuf[dindex] * get_volume(s, cp->volume), -1, 1);
} else {
count++;
@ -276,7 +276,7 @@ static int compand_drain(AVFilterLink *outlink)
for (chan = 0; chan < channels; chan++) {
double *dbuf = (double *)s->delayptrs[chan];
double *dst = (double *)frame->data[chan];
double *dst = (double *)frame->extended_data[chan];
ChanParam *cp = &s->channels[chan];
dindex = s->delay_index;