diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-15 16:13:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-15 16:13:53 +0100 |
commit | cd5f50a255321a6917f7a465cd1159fe4fc4948e (patch) | |
tree | 2c9058c6caaac9774139ea0a8c2ffea49eb86c44 /libavfilter | |
parent | 64308941d4043388a16c2d2fd51c792cfdcc2734 (diff) | |
download | ffmpeg-streaming-cd5f50a255321a6917f7a465cd1159fe4fc4948e.zip ffmpeg-streaming-cd5f50a255321a6917f7a465cd1159fe4fc4948e.tar.gz |
avfilter: avoid direct access to AVFrame.channels
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/af_aconvert.c | 2 | ||||
-rw-r--r-- | libavfilter/af_afade.c | 4 | ||||
-rw-r--r-- | libavfilter/af_amerge.c | 2 | ||||
-rw-r--r-- | libavfilter/af_apad.c | 2 | ||||
-rw-r--r-- | libavfilter/af_aresample.c | 2 | ||||
-rw-r--r-- | libavfilter/af_biquads.c | 2 | ||||
-rw-r--r-- | libavfilter/af_pan.c | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/libavfilter/af_aconvert.c b/libavfilter/af_aconvert.c index 2cf12e3..c05e571 100644 --- a/libavfilter/af_aconvert.c +++ b/libavfilter/af_aconvert.c @@ -147,7 +147,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamplesref) (void *)insamplesref->extended_data, n); av_frame_copy_props(outsamplesref, insamplesref); - outsamplesref->channels = outlink->channels; + av_frame_set_channels(outsamplesref, outlink->channels); outsamplesref->channel_layout = outlink->channel_layout; ret = ff_filter_frame(outlink, outsamplesref); diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index 0e660a3..1134849 100644 --- a/libavfilter/af_afade.c +++ b/libavfilter/af_afade.c @@ -256,7 +256,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) if ((!afade->type && (cur_sample + nb_samples < afade->start_sample)) || ( afade->type && (afade->start_sample + afade->nb_samples < cur_sample))) { av_samples_set_silence(out_buf->extended_data, 0, nb_samples, - out_buf->channels, out_buf->format); + av_frame_get_channels(out_buf), out_buf->format); } else { int64_t start; @@ -266,7 +266,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) start = afade->start_sample + afade->nb_samples - cur_sample; afade->fade_samples(out_buf->extended_data, buf->extended_data, - nb_samples, buf->channels, + nb_samples, av_frame_get_channels(buf), afade->type ? -1 : 1, start, afade->nb_samples, afade->curve); } diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index b26141d..28c3682 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -263,7 +263,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) outbuf->nb_samples = nb_samples; outbuf->channel_layout = outlink->channel_layout; - outbuf->channels = outlink->channels; + av_frame_set_channels(outbuf, outlink->channels); while (nb_samples) { ns = nb_samples; diff --git a/libavfilter/af_apad.c b/libavfilter/af_apad.c index b3a4b95..b4a0fc8 100644 --- a/libavfilter/af_apad.c +++ b/libavfilter/af_apad.c @@ -122,7 +122,7 @@ static int request_frame(AVFilterLink *outlink) av_samples_set_silence(outsamplesref->extended_data, 0, n_out, - outsamplesref->channels, + av_frame_get_channels(outsamplesref), outsamplesref->format); outsamplesref->pts = apad->next_pts; diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index be1e4b7..80351c3 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -188,7 +188,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamplesref) av_frame_copy_props(outsamplesref, insamplesref); outsamplesref->format = outlink->format; - outsamplesref->channels = outlink->channels; + av_frame_set_channels(outsamplesref, outlink->channels); outsamplesref->channel_layout = outlink->channel_layout; outsamplesref->sample_rate = outlink->sample_rate; diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index 6384090..0bd61fd 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -409,7 +409,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) out_buf->pts = buf->pts; } - for (ch = 0; ch < buf->channels; ch++) + for (ch = 0; ch < av_frame_get_channels(buf); ch++) p->filter(buf->extended_data[ch], out_buf->extended_data[ch], nb_samples, &p->cache[ch].i1, &p->cache[ch].i2, diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c index 9a3c10c..ae2e0aa 100644 --- a/libavfilter/af_pan.c +++ b/libavfilter/af_pan.c @@ -364,7 +364,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) swr_convert(pan->swr, outsamples->data, n, (void *)insamples->data, n); av_frame_copy_props(outsamples, insamples); outsamples->channel_layout = outlink->channel_layout; - outsamples->channels = outlink->channels; + av_frame_set_channels(outsamples, outlink->channels); ret = ff_filter_frame(outlink, outsamples); av_frame_free(&insamples); |