Fix(examples): Ensure correct video resolution in record-video.py
Addresses issue #232
Problem:
On certain operating systems, particularly Windows, the record-video.py example script fails to save the video correctly. This is due to a race condition where the videoRecorder thread initialises the cv2.VideoWriter uses the dimensions of an initial, low-resolution placeholder frame (400x300) before the actual video stream from the drone has started.
When the high-resolution frames (e.g., 960x720) arrive, cv2.VideoWriter fails to write them because their dimensions do not match the dimensions it was configured with, preventing the video from being saved.
Solution:
This pull request resolves the race condition by explicitly waiting for the first real video frame to be received from the drone before initialising the cv2.VideoWriter.
A while loop has been added to pause the script until the frame's shape no longer matches the placeholder dimensions. This guarantees that the VideoWriter is always created with the correct, final resolution of the video stream, making the example script robust and reliable across all platforms.