aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2019-09-28 22:06:50 +0200
committerPaul B Mahol <onemda@gmail.com>2019-09-28 22:09:56 +0200
commit947e8ab329af5d59d47c1ef8a08d6a84109a89be (patch)
treed9cc1f81ed51b8ac23c4e585be76c2a910e1d758
parent216830aca4ffcb60d1a71bcf3c30c44050034e78 (diff)
downloadffmpeg-947e8ab329af5d59d47c1ef8a08d6a84109a89be.tar.gz
avfilter/fifo: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
-rw-r--r--libavfilter/fifo.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c
index 39204eb1c2..f5587df62a 100644
--- a/libavfilter/fifo.c
+++ b/libavfilter/fifo.c
@@ -53,38 +53,38 @@ typedef struct FifoContext {
static av_cold int init(AVFilterContext *ctx)
{
- FifoContext *fifo = ctx->priv;
- fifo->last = &fifo->root;
+ FifoContext *s = ctx->priv;
+ s->last = &s->root;
return 0;
}
static av_cold void uninit(AVFilterContext *ctx)
{
- FifoContext *fifo = ctx->priv;
+ FifoContext *s = ctx->priv;
Buf *buf, *tmp;
- for (buf = fifo->root.next; buf; buf = tmp) {
+ for (buf = s->root.next; buf; buf = tmp) {
tmp = buf->next;
av_frame_free(&buf->frame);
av_free(buf);
}
- av_frame_free(&fifo->out);
+ av_frame_free(&s->out);
}
static int add_to_queue(AVFilterLink *inlink, AVFrame *frame)
{
- FifoContext *fifo = inlink->dst->priv;
+ FifoContext *s = inlink->dst->priv;
- fifo->last->next = av_mallocz(sizeof(Buf));
- if (!fifo->last->next) {
+ s->last->next = av_mallocz(sizeof(Buf));
+ if (!s->last->next) {
av_frame_free(&frame);
return AVERROR(ENOMEM);
}
- fifo->last = fifo->last->next;
- fifo->last->frame = frame;
+ s->last = s->last->next;
+ s->last->frame = frame;
return 0;
}
@@ -229,24 +229,24 @@ static int return_audio_frame(AVFilterContext *ctx)
static int request_frame(AVFilterLink *outlink)
{
- FifoContext *fifo = outlink->src->priv;
+ FifoContext *s = outlink->src->priv;
int ret = 0;
- if (!fifo->root.next) {
+ if (!s->root.next) {
if ((ret = ff_request_frame(outlink->src->inputs[0])) < 0) {
if (ret == AVERROR_EOF && outlink->request_samples)
return return_audio_frame(outlink->src);
return ret;
}
- if (!fifo->root.next)
+ if (!s->root.next)
return 0;
}
if (outlink->request_samples) {
return return_audio_frame(outlink->src);
} else {
- ret = ff_filter_frame(outlink, fifo->root.next->frame);
- queue_pop(fifo);
+ ret = ff_filter_frame(outlink, s->root.next->frame);
+ queue_pop(s);
}
return ret;