After a bit more testing this fix does seem to be effective - at least in allowing a video connection to always be established. After the iOS device has sat idle for a while it does revert to the audio icon again as it used to however if I go ahead and select the audio icon it seems to establish a video connection on the first attempt and then if I immediately go back into the airplay settings it is now recognised as video. So it could just be that the UI is not updated on the fly to reflect the change in source type detected.
Yesterday I was having some weird problems with streaming the youtube app where the video would start and play for about 10 seconds then XBMC would drop back to the home screen as if the airplay had aborted, but then about 2 seconds later it would automatically reconnect. (it was doing it every time the same) I don't think that's anything to do with this fix or specifically related to the issue at hand though (detection as audio instead of video) but rather just general flakiness of airplay video. It seems to be working fine today.
I've primarily been testing with an iPad 3 running iOS 7.1, and on a Mac Mini running OS X 10.6.8.
If you're happy with the feedback so far for the fix then I'm going to have to switch back to Frodo or try a different Gotham build as I'm having a couple of unrelated problems with this build - one is every time I start playing video I get an alert "Video rendering failed to init video filters/scalers falling back to bilinear scaling" - I'm assuming this is a known limitation of this test build if not let me know where I can continue discussion of it.
The other more serious problem is the new buffering system for streaming video is all screwed up - it won't buffer ahead when the video is paused like Frodo did which means that (a) I can't pause a video with marginal download speed for a minute to allow it to fill the buffer and have a better chance to play (as soon as I pause it, it stops downloading and buffering ahead) and (b) if the buffer runs out due to slow throughput the video will automatically pause but then once paused it stops downloading/buffering so it sits indefinitely in pause not willing to download any more or automatically recover. If I manually un-pause it and it downloads quick enough to keep ahead it will play again but if I un-pause it and it stumbles slightly and runs the buffer empty it will pause indefinitely again. (Some streaming sites take a number of seconds to reach full throughput again)
I haven't run any other Gotham builds on Mac OS yet so I'm not sure if this is a known issue with your test build or a more general Gotham problem. (I'll try the latest Gotham beta shortly)
Thanks for the work on getting airplay working a bit more reliably, and fingers crossed your fix will make it into the first stable release of Gotham