Message ID | 20240301141135.23870-1-ffmpeg@gyani.pro |
---|---|
State | Accepted |
Commit | 3d1860ec8db7f9785bf1338e826138c0218dfb59 |
Headers | show |
Series | [FFmpeg-devel] avfilter: update filter timeline state only on main link | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On 2024-03-01 07:41 pm, Gyan Doshi wrote: > At present, consume_update evaluates timeline state on all links for > a multi-input filter. This can lead to the filter being incorrectly > en/dis-abled when evaluation on a frame on a secondary link leads to > a different result than the frame on the current main link next in > line for processing. Ping. Plan to apply in 72h, barring objections. Regards, Gyan > --- > libavfilter/avfilter.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c > index daa7c3672a..d7ea993508 100644 > --- a/libavfilter/avfilter.c > +++ b/libavfilter/avfilter.c > @@ -1430,7 +1430,8 @@ static void consume_update(FilterLinkInternal *li, const AVFrame *frame) > AVFilterLink *const link = &li->l; > update_link_current_pts(li, frame->pts); > ff_inlink_process_commands(link, frame); > - link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); > + if (link == link->dst->inputs[0]) > + link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); > link->frame_count_out++; > link->sample_count_out += frame->nb_samples; > }
On 2024-03-06 11:02 am, Gyan Doshi wrote: > > > On 2024-03-01 07:41 pm, Gyan Doshi wrote: >> At present, consume_update evaluates timeline state on all links for >> a multi-input filter. This can lead to the filter being incorrectly >> en/dis-abled when evaluation on a frame on a secondary link leads to >> a different result than the frame on the current main link next in >> line for processing. > > Ping. Plan to apply in 72h, barring objections. Pushed as 3d1860ec8db7f9785bf1338e826138c0218dfb59 Regards, Gyan
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index daa7c3672a..d7ea993508 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -1430,7 +1430,8 @@ static void consume_update(FilterLinkInternal *li, const AVFrame *frame) AVFilterLink *const link = &li->l; update_link_current_pts(li, frame->pts); ff_inlink_process_commands(link, frame); - link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); + if (link == link->dst->inputs[0]) + link->dst->is_disabled = !ff_inlink_evaluate_timeline_at_frame(link, frame); link->frame_count_out++; link->sample_count_out += frame->nb_samples; }