Re: [FFmpeg-devel] [PATCH] lavfi: check the validity of formats lists.

2020-08-14 Thread Nicolas George
Michael Niedermayer (12020-08-14): > this > ffplay -nostats mm-short.mpg -t 1 -af volume=replaygain=track,ebur128 -nodisp > -autoexit > > gets stuck with the patch, seems not depend on the input sample Thanks for the testing. It reveals two bugs in ffplay: - On buffersink, it sets both channe

Re: [FFmpeg-devel] [PATCH] lavfi: check the validity of formats lists.

2020-08-14 Thread Michael Niedermayer
On Thu, Aug 13, 2020 at 01:20:28PM +0200, Nicolas George wrote: > Part of the code expect valid lists, in particular no duplicates. > These tests allow to catch bugs in filters (unlikely but possible) > and to give a clear message when the error comes from the user > ((a)formats) or the application

Re: [FFmpeg-devel] [PATCH] lavfi: check the validity of formats lists.

2020-08-13 Thread Nicolas George
Andreas Rheinhardt (12020-08-13): > Which part of the code fails if there are duplicates? At least the merge loops. They can be protected, but the result is still invalid and should be avoided, preferably with useful diagnostic. > ff_merge_channel_layouts() can be easily fixed by adding breaks to

Re: [FFmpeg-devel] [PATCH] lavfi: check the validity of formats lists.

2020-08-13 Thread Andreas Rheinhardt
Nicolas George: > Part of the code expect valid lists, in particular no duplicates. Which part of the code fails if there are duplicates? ff_merge_channel_layouts() can be easily fixed by adding breaks to all loops, so if it is only this, we could forgo checking as its cost is quadratic in the num

[FFmpeg-devel] [PATCH] lavfi: check the validity of formats lists.

2020-08-13 Thread Nicolas George
Part of the code expect valid lists, in particular no duplicates. These tests allow to catch bugs in filters (unlikely but possible) and to give a clear message when the error comes from the user ((a)formats) or the application (buffersink). Signed-off-by: Nicolas George --- libavfilter/avfilter