changeset 2432:99e7bd7ec0a2

* Fixed OpenAL crash for videos * Fixed double release of movie for Emerald Intro
author a.parshin
date Wed, 23 Jul 2014 21:38:34 +0300
parents a2d95b16e28b
children 9f30d514cdd2 1eb352f7319a
files Game.cpp MediaPlayer.cpp OpenALSoundProvider.h
diffstat 3 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Game.cpp	Wed Jul 23 20:53:28 2014 +0300
+++ b/Game.cpp	Wed Jul 23 21:38:34 2014 +0300
@@ -4534,7 +4534,7 @@
           }
           if ( pCurrentScreen == SCREEN_VIDEO )
           {
-            pVideoPlayer->Unload();
+            //pVideoPlayer->Unload();
           }
           else
           {
--- a/MediaPlayer.cpp	Wed Jul 23 20:53:28 2014 +0300
+++ b/MediaPlayer.cpp	Wed Jul 23 21:38:34 2014 +0300
@@ -981,6 +981,7 @@
               __debugbreak();
           } while (!frameFinished);
         }
+        else __debugbreak(); // unknown stream
       }
       while (avpacket->stream_index != video.stream_idx ||
                avpacket->pts != desired_frame_number);
--- a/OpenALSoundProvider.h	Wed Jul 23 20:53:28 2014 +0300
+++ b/OpenALSoundProvider.h	Wed Jul 23 21:38:34 2014 +0300
@@ -159,6 +159,7 @@
       }
 
       unsigned int al_source = -1;
+      alGetError();
       alGenSources(1, &al_source);
       if (CheckError())
         return nullptr;