Prevent black lines from appearing on the sides of the video when resizing.

This happened mostly when resizing manually or when using auto-fit zoom.

Fixes #2423.