From: Brad A. <br...@us...> - 2012-07-06 17:13:11
|
gemrb: Infinity Engine emulator The branch master has been updated via 72daefdbf0d36e31ec505c5b8ad73553108c563d (commit) Summary of changes: gemrb/plugins/SDLVideo/SDL20Video.cpp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) from 7a3f362e149c750a921836440750d757142b7ba9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=72daefdbf0d36e31ec505c5b8ad73553108c563d commit 72daefdbf0d36e31ec505c5b8ad73553108c563d Author: Brad Allred <bra...@me...> Date: Fri Jul 6 11:12:44 2012 -0600 SDL20Video: add some error handling for video playback. diff --git a/gemrb/plugins/SDLVideo/SDL20Video.cpp b/gemrb/plugins/SDLVideo/SDL20Video.cpp index 7447e32..014fdad 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL20Video.cpp @@ -121,6 +121,9 @@ void SDL20VideoDriver::InitMovieScreen(int &w, int &h, bool yuv) } else { videoPlayer = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, winW, winH); } + if (!videoPlayer) { + Log(ERROR, "SDL 2 Driver", "Unable to create texture for video playback: %s", SDL_GetError()); + } w = winW; h = winH; //setting the subtitle region to the bottom 1/4th of the screen @@ -152,7 +155,10 @@ void SDL20VideoDriver::showFrame(unsigned char* buf, unsigned int bufw, int pitch; SDL_Color color = {0, 0, 0, 0}; - SDL_LockTexture(videoPlayer, NULL, &pixels, &pitch); + if(!SDL_LockTexture(videoPlayer, NULL, &pixels, &pitch)) { + Log(ERROR, "SDL 2 driver", "Unable to lock video player: %s", SDL_GetError()); + return; + } src = buf; if (g_truecolor) { for (row = 0; row < bufh; ++row) { ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |