mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/f_drawgraph: fix drawing of first point for non-first metadata key
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
9832885386
commit
29e0879b29
|
@ -43,7 +43,7 @@ typedef struct DrawGraphContext {
|
||||||
AVFrame *out;
|
AVFrame *out;
|
||||||
int x;
|
int x;
|
||||||
int prev_y[4];
|
int prev_y[4];
|
||||||
int first;
|
int first[4];
|
||||||
float *values[4];
|
float *values[4];
|
||||||
int values_size[4];
|
int values_size[4];
|
||||||
int nb_values;
|
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) {
|
if (s->slide == 4) {
|
||||||
s->values[0] = av_fast_realloc(NULL, &s->values_size[0], 2000);
|
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);
|
draw_dot(fg, x, y, out);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (s->first) {
|
if (s->first[i]) {
|
||||||
s->first = 0;
|
s->first[i] = 0;
|
||||||
s->prev_y[i] = y;
|
s->prev_y[i] = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,8 +366,8 @@ static int request_frame(AVFilterLink *outlink)
|
||||||
draw_dot(fg, x, y, out);
|
draw_dot(fg, x, y, out);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
if (s->first) {
|
if (s->first[i]) {
|
||||||
s->first = 0;
|
s->first[i] = 0;
|
||||||
s->prev_y[i] = y;
|
s->prev_y[i] = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue