In order to concat both audio + video simultaneously, the concat filter must support a and v parameters and incorporate those values in the calculation for the output n value.
Without these changes, the test_filter_concat__audio_video fails with concat=n=4 instead of concat=n=2.
See AV pipeline example.