Line 1530:
lens_info.focal_len = bswap16( lv_lens->focal_len );
Try printing this info, e.g. like this:
printf("FL %d\n", lens_info.focal_len);
And you'll see what values you get from Canon firmware (see
Properties on the wiki) and how often they are refreshed. In this case, Canon firmware sends 50 when the lens is disconnected, and it does so either a few times in the first seconds after enabling LiveView or changing the video mode, or - sometimes - continuously a few times per second (5D3). The behavior is inconsistent, no idea why. This property contains other fields as well (it's not just a simple scalar value), so when those other fields change, focal_len is refreshed as well.
To see what's the reason for that bogus value check, use
hg blame to look at lens.c, and this will point you to
this issue.
The status displays in ML simply ignore this value for non-CPU lenses (checked using lens_info.name[0]). The best way would be probably to reassign focal_len to 0 in PROP_LV_LENS (which will affect all other parts of the code that use it).
This quirk went unnoticed because, in ML status indicators, the code was checking for valid lens_info.name[0] or aperture before using the focal_len field (so at first, I thought it must be MLV code writing a nonzero focal length by default for some reason).