From 28eae548734d597d4722d9fb80c7082474533098 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Sun, 15 Feb 2009 17:32:53 +0000 Subject: patch #2388324. Exit with corrupt videos. Courtesy to Hawkear git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1593 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/media/UVideo.pas | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/media/UVideo.pas b/src/media/UVideo.pas index 197fc572..2d3b7620 100644 --- a/src/media/UVideo.pas +++ b/src/media/UVideo.pas @@ -532,8 +532,17 @@ begin end; // no error -> wait for user input - SDL_Delay(100); +{ + SDL_Delay(100); // initial version, left for documentation continue; +} + + // Patch by Hawkear: + // Why should this function loop in an endless loop if there is an error? + // This runs in the main thread, so it halts the whole program + // Therefore, it is better to exit when an error occurs + Exit; + end; // if we got a packet from the video stream, then decode it -- cgit v1.2.3