diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-08-26 13:03:32 -0400 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2015-08-29 16:38:38 +0000 |
commit | 47b41feb7283dcb4622dc0ada8056cb9a2de0f53 (patch) | |
tree | f9e94e544db7a218471a9294f48ecf381a55f4b0 /libavfilter/af_apad.c | |
parent | 16229fae9c0da763061c679e766e9c66dd478b02 (diff) | |
download | ffmpeg-47b41feb7283dcb4622dc0ada8056cb9a2de0f53.tar.gz |
avfilter/af_apad: use the name 's' for the pointer to the private context
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavfilter/af_apad.c')
-rw-r--r-- | libavfilter/af_apad.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/libavfilter/af_apad.c b/libavfilter/af_apad.c index eafc7050e8..0a2d4206a9 100644 --- a/libavfilter/af_apad.c +++ b/libavfilter/af_apad.c @@ -57,15 +57,15 @@ AVFILTER_DEFINE_CLASS(apad); static av_cold int init(AVFilterContext *ctx) { - APadContext *apad = ctx->priv; + APadContext *s = ctx->priv; - apad->next_pts = AV_NOPTS_VALUE; - if (apad->whole_len >= 0 && apad->pad_len >= 0) { + s->next_pts = AV_NOPTS_VALUE; + if (s->whole_len >= 0 && s->pad_len >= 0) { av_log(ctx, AV_LOG_ERROR, "Both whole and pad length are set, this is not possible\n"); return AVERROR(EINVAL); } - apad->pad_len_left = apad->pad_len; - apad->whole_len_left = apad->whole_len; + s->pad_len_left = s->pad_len; + s->whole_len_left = s->whole_len; return 0; } @@ -73,38 +73,38 @@ static av_cold int init(AVFilterContext *ctx) static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext *ctx = inlink->dst; - APadContext *apad = ctx->priv; + APadContext *s = ctx->priv; - if (apad->whole_len >= 0) { - apad->whole_len_left = FFMAX(apad->whole_len_left - frame->nb_samples, 0); + if (s->whole_len >= 0) { + s->whole_len_left = FFMAX(s->whole_len_left - frame->nb_samples, 0); av_log(ctx, AV_LOG_DEBUG, - "n_out:%d whole_len_left:%"PRId64"\n", frame->nb_samples, apad->whole_len_left); + "n_out:%d whole_len_left:%"PRId64"\n", frame->nb_samples, s->whole_len_left); } - apad->next_pts = frame->pts + av_rescale_q(frame->nb_samples, (AVRational){1, inlink->sample_rate}, inlink->time_base); + s->next_pts = frame->pts + av_rescale_q(frame->nb_samples, (AVRational){1, inlink->sample_rate}, inlink->time_base); return ff_filter_frame(ctx->outputs[0], frame); } static int request_frame(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; - APadContext *apad = ctx->priv; + APadContext *s = ctx->priv; int ret; ret = ff_request_frame(ctx->inputs[0]); if (ret == AVERROR_EOF && !ctx->is_disabled) { - int n_out = apad->packet_size; + int n_out = s->packet_size; AVFrame *outsamplesref; - if (apad->whole_len >= 0 && apad->pad_len < 0) { - apad->pad_len = apad->pad_len_left = apad->whole_len_left; + if (s->whole_len >= 0 && s->pad_len < 0) { + s->pad_len = s->pad_len_left = s->whole_len_left; } - if (apad->pad_len >=0 || apad->whole_len >= 0) { - n_out = FFMIN(n_out, apad->pad_len_left); - apad->pad_len_left -= n_out; + if (s->pad_len >=0 || s->whole_len >= 0) { + n_out = FFMIN(n_out, s->pad_len_left); + s->pad_len_left -= n_out; av_log(ctx, AV_LOG_DEBUG, - "padding n_out:%d pad_len_left:%"PRId64"\n", n_out, apad->pad_len_left); + "padding n_out:%d pad_len_left:%"PRId64"\n", n_out, s->pad_len_left); } if (!n_out) @@ -122,9 +122,9 @@ static int request_frame(AVFilterLink *outlink) av_frame_get_channels(outsamplesref), outsamplesref->format); - outsamplesref->pts = apad->next_pts; - if (apad->next_pts != AV_NOPTS_VALUE) - apad->next_pts += av_rescale_q(n_out, (AVRational){1, outlink->sample_rate}, outlink->time_base); + outsamplesref->pts = s->next_pts; + if (s->next_pts != AV_NOPTS_VALUE) + s->next_pts += av_rescale_q(n_out, (AVRational){1, outlink->sample_rate}, outlink->time_base); return ff_filter_frame(outlink, outsamplesref); } |