Ah! I think I may have it. From the manual: "When video_set is called several times within the same frame, it can fail when the OS is busy with rebuilding the window while it is resized. In this case, video_set returns 0. Just call it again in the next frame with the same parameters."

It's like I can't even understand the manual. I swear I've read this page 10 times, and I never saw this!