X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavfilter%2Ff_drawgraph.c;h=f49d5b80220122bbe17e6e50d7709f640d650a26;hb=8dc5eb43b070efe152be8971ae58512ea23ecc02;hp=8be9b9f95a555b040b2c500e8177d3c8702fe18c;hpb=23ba9b3fd1fe8fe7a67387aaaff2b173bd7c3d2c;p=ffmpeg diff --git a/libavfilter/f_drawgraph.c b/libavfilter/f_drawgraph.c index 8be9b9f95a5..f49d5b80220 100644 --- a/libavfilter/f_drawgraph.c +++ b/libavfilter/f_drawgraph.c @@ -43,7 +43,7 @@ typedef struct DrawGraphContext { AVFrame *out; int x; int prev_y[4]; - int first; + int first[4]; float *values[4]; int values_size[4]; int nb_values; @@ -102,7 +102,7 @@ static av_cold int init(AVFilterContext *ctx) } } - s->first = 1; + s->first[0] = s->first[1] = s->first[2] = s->first[3] = 1; if (s->slide == 4) { s->values[0] = av_fast_realloc(NULL, &s->values_size[0], 2000); @@ -282,8 +282,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) draw_dot(fg, x, y, out); break; case 2: - if (s->first) { - s->first = 0; + if (s->first[i]) { + s->first[i] = 0; s->prev_y[i] = y; } @@ -366,8 +366,8 @@ static int request_frame(AVFilterLink *outlink) draw_dot(fg, x, y, out); break; case 2: - if (s->first) { - s->first = 0; + if (s->first[i]) { + s->first[i] = 0; s->prev_y[i] = y; }