You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavfi/avf_showwaves: remove looping on request_frame().
This commit is contained in:
@@ -53,7 +53,6 @@ typedef struct {
|
|||||||
int buf_idx;
|
int buf_idx;
|
||||||
int16_t *buf_idy; /* y coordinate of previous sample for each channel */
|
int16_t *buf_idy; /* y coordinate of previous sample for each channel */
|
||||||
AVFrame *outpicref;
|
AVFrame *outpicref;
|
||||||
int req_fullfilled;
|
|
||||||
int n;
|
int n;
|
||||||
int sample_count_mod;
|
int sample_count_mod;
|
||||||
int mode; ///< ShowWavesMode
|
int mode; ///< ShowWavesMode
|
||||||
@@ -179,8 +178,7 @@ inline static int push_frame(AVFilterLink *outlink)
|
|||||||
int nb_channels = inlink->channels;
|
int nb_channels = inlink->channels;
|
||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
if ((ret = ff_filter_frame(outlink, showwaves->outpicref)) >= 0)
|
ret = ff_filter_frame(outlink, showwaves->outpicref);
|
||||||
showwaves->req_fullfilled = 1;
|
|
||||||
showwaves->outpicref = NULL;
|
showwaves->outpicref = NULL;
|
||||||
showwaves->buf_idx = 0;
|
showwaves->buf_idx = 0;
|
||||||
for (i = 0; i < nb_channels; i++)
|
for (i = 0; i < nb_channels; i++)
|
||||||
@@ -248,11 +246,7 @@ static int request_frame(AVFilterLink *outlink)
|
|||||||
AVFilterLink *inlink = outlink->src->inputs[0];
|
AVFilterLink *inlink = outlink->src->inputs[0];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
showwaves->req_fullfilled = 0;
|
|
||||||
do {
|
|
||||||
ret = ff_request_frame(inlink);
|
ret = ff_request_frame(inlink);
|
||||||
} while (!showwaves->req_fullfilled && ret >= 0);
|
|
||||||
|
|
||||||
if (ret == AVERROR_EOF && showwaves->outpicref) {
|
if (ret == AVERROR_EOF && showwaves->outpicref) {
|
||||||
if (showwaves->single_pic)
|
if (showwaves->single_pic)
|
||||||
push_single_pic(outlink);
|
push_single_pic(outlink);
|
||||||
|
Reference in New Issue
Block a user