Blackbodies emit a continuous spectrum of radiation, whereas a cavity with reflective walls at thermal equilibrium contains a discrete spectrum.
According to Kirchoff, "smoothing out" the spectrum of the cavity radiation by looking at the average number of frequencies permitted by the cavity in a small frequency interval from $f$ to $f+df$, which leads to the Rayleigh-Jeans law which was later refined and became Planck's law, should give the blackbody radiation spectrum.
Kirchoff's argument was that when the cavity is at thermal equilibrium at some temperature, for which another blackbody at this temperature must have been placed in it for some time before being removed, allowing a certain frequency band to escape from this cavity into another cavity with opaque, say, perfectly absorbing walls at the same temperature should not lead to a change in temperature of the walls of the cavity with opaque walls for this would violate the 2nd law of thermodynamics.
This sounds very convincing but I cannot help but contemplate the following:
If said frequency band that can pass through the filter is constrained to, say, the lowest frequency that is permitted by the cavity and we make this frequency band ever tighter around precisely this lowest permitted frequency. The amount of radiation that the walls of the opaque cavity can radiate into the cavity with reflective walls grows ever smaller since the opaque walls emit a continuous spectrum. The radiation the goes from the reflective cavity into the opaque cavity, however, will not change because our frequency band is constrained to this frequency which the cavity permits discretely. The walls in the opaque cavity would absorb more than they can radiate away and so their temperature rises and the 2nd law of thermodynamics would be violated.
Please share your insights as to why this is an incorrect analysis.