avfilter/avfiltergraph: always retry format negotiation after auto-filters

There is an edge case not covered by the current logic: If there is only
a single auto-filter inserted, but the auto-inserted filter is incompatible
with a *different* format attribute (after settling the previous formats),
we may need a second auto-filter (e.g. `scale`) to settle the newly introduced
incompatibility.

A regression test demonstrating the issue is added.
This commit is contained in:
Niklas Haas
2025-12-04 13:25:03 +01:00
committed by Niklas Haas
parent 16050a1cef
commit 978a0821ee
3 changed files with 23 additions and 4 deletions
+5 -4
View File
@@ -701,10 +701,11 @@ retry:
}
}
/* if there is more than one auto filter, we may need another round
* to fully settle formats due to possible cross-incompatibilities
* between the auto filters themselves */
if (num_conv > 1)
/* if there is an auto filter, we may need another round to fully
* settle formats due to possible cross-incompatibilities between
* the auto filters themselves, or between the auto filters and
* a different attribute of the filter they are modifying */
if (num_conv)
goto retry;
}
}