Backport of "audio,video-format: Make generate_raw_formats idempotent for assertions" into 1.18
Backport of !1177 (merged) "audio,video-format: Make generate_raw_formats idempotent for assertions".
Commits:
- 9a502c15 audio,video-format: Make generate_raw_formats idempotent for assertions