aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorEarl Levine <elevine@gmail.com>2006-05-19 08:38:09 +0000
committerDiego Biurrun <diego@biurrun.de>2006-05-19 08:38:09 +0000
commit4b0e85d4abbb70453d2f61257ce111d21299a28e (patch)
treeea03ab753a8d231e6c8eece5813cfd51e49a6de6 /ffplay.c
parentb4aead58cbd408fba0ee11d3d0e70a2e33ed2158 (diff)
downloadffmpeg-4b0e85d4abbb70453d2f61257ce111d21299a28e.tar.gz
Fix segfault on Mac OS X, patch by Earl Levine elevine**@**gmail**.**com.
Originally committed as revision 5408 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ffplay.c b/ffplay.c
index 80ff4b5633..360ee9716a 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2434,8 +2434,8 @@ int main(int argc, char **argv)
video_disable = 1;
}
flags = SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER;
-#ifndef CONFIG_WIN32
- flags |= SDL_INIT_EVENTTHREAD; /* Not supported on win32 */
+#if !defined(CONFIG_WIN32) && !defined(CONFIG_DARWIN)
+ flags |= SDL_INIT_EVENTTHREAD; /* Not supported on win32 or darwin */
#endif
if (SDL_Init (flags)) {
fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError());
@@ -2466,7 +2466,12 @@ int main(int argc, char **argv)
h = screen_height;
flags |= SDL_RESIZABLE;
}
+#ifndef CONFIG_DARWIN
screen = SDL_SetVideoMode(w, h, 0, flags);
+#else
+ /* setting bits_per_pixel = 0 or 32 causes blank video on OS X */
+ screen = SDL_SetVideoMode(w, h, 24, flags);
+#endif
if (!screen) {
fprintf(stderr, "SDL: could not set video mode - exiting\n");
exit(1);