|
|
|
@ -109,6 +109,7 @@ typedef struct ShowSpectrumContext { |
|
|
|
|
float dmin, dmax; |
|
|
|
|
uint64_t samples; |
|
|
|
|
int (*plot_channel)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); |
|
|
|
|
int eof; |
|
|
|
|
|
|
|
|
|
float opacity_factor; |
|
|
|
|
|
|
|
|
@ -1543,8 +1544,7 @@ static int plot_spectrum_column(AVFilterLink *inlink, AVFrame *insamples) |
|
|
|
|
|
|
|
|
|
if (!s->single_pic && (s->sliding != FULLFRAME || s->xpos == 0)) { |
|
|
|
|
if (s->old_pts < outpicref->pts || s->sliding == FULLFRAME || |
|
|
|
|
(ff_outlink_get_status(inlink) == AVERROR_EOF && |
|
|
|
|
ff_inlink_queued_samples(inlink) <= s->hop_size)) { |
|
|
|
|
(s->eof && ff_inlink_queued_samples(inlink) <= s->hop_size)) { |
|
|
|
|
AVFrame *clone; |
|
|
|
|
|
|
|
|
|
if (s->legend) { |
|
|
|
@ -1600,7 +1600,7 @@ static int activate(AVFilterContext *ctx) |
|
|
|
|
|
|
|
|
|
FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink); |
|
|
|
|
|
|
|
|
|
if (s->outpicref) { |
|
|
|
|
if (s->outpicref && ff_inlink_queued_samples(inlink) > 0) { |
|
|
|
|
AVFrame *fin; |
|
|
|
|
|
|
|
|
|
ret = ff_inlink_consume_samples(inlink, s->hop_size, s->hop_size, &fin); |
|
|
|
@ -1627,8 +1627,7 @@ static int activate(AVFilterContext *ctx) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (ff_outlink_get_status(inlink) == AVERROR_EOF && |
|
|
|
|
s->sliding == FULLFRAME && |
|
|
|
|
if (s->eof && s->sliding == FULLFRAME && |
|
|
|
|
s->xpos > 0 && s->outpicref) { |
|
|
|
|
|
|
|
|
|
if (s->orientation == VERTICAL) { |
|
|
|
@ -1656,11 +1655,15 @@ static int activate(AVFilterContext *ctx) |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (ff_inlink_acknowledge_status(inlink, &status, &pts)) { |
|
|
|
|
if (status == AVERROR_EOF) { |
|
|
|
|
ff_outlink_set_status(outlink, status, s->pts); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
if (!s->eof && ff_inlink_acknowledge_status(inlink, &status, &pts)) { |
|
|
|
|
s->eof = status == AVERROR_EOF; |
|
|
|
|
ff_filter_set_ready(ctx, 100); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (s->eof) { |
|
|
|
|
ff_outlink_set_status(outlink, AVERROR_EOF, s->pts); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (ff_inlink_queued_samples(inlink) >= s->hop_size) { |
|
|
|
|