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 all
> loops, so if it is only this, we could forgo checking as its cost is
> quadratic in the number of elements.

The merges are quadratic too, this is just changing the constant.

We could avoid all quadratic operations by sorting the list. If we
decide to do so, these check functions are good candidates to be renamed
"prepare" or "optimize" and do it.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to