rpi: Avoid crash when video ends

Fixes #1759