summaryrefslogtreecommitdiffstats
path: root/libvo/vo_gl.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-10-06 04:28:59 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-10-06 04:48:00 +0300
commit7fd3eb0f74e7986e07556077ed654bad7869add8 (patch)
tree8d293145c0ef2bc31ca63f79dccb4e3b57294c82 /libvo/vo_gl.c
parentef438b3a6b5bc714d521dd46d3ccb798ecd31eed (diff)
parentcbbc886820e981f488660708678f528e1d243121 (diff)
downloadmpv-7fd3eb0f74e7986e07556077ed654bad7869add8.tar.bz2
mpv-7fd3eb0f74e7986e07556077ed654bad7869add8.tar.xz
Merge svn changes up to r29752
As part of merging subtitle-in-terminal changes make update_subtitles() only clear existing subtitles if called with the reset argument, and not try to set new ones. Later calls should set the needed new subtitles, and this change avoids some problems with trying to set subtitles when mp_property_sub() in command.c gets called from initialization code before full initialization.
Diffstat (limited to 'libvo/vo_gl.c')
-rw-r--r--libvo/vo_gl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c
index a97b524c56..1bd908f22b 100644
--- a/libvo/vo_gl.c
+++ b/libvo/vo_gl.c
@@ -431,7 +431,7 @@ static void uninitGl(void) {
DeleteBuffers(2, gl_buffer_uv);
gl_buffer_uv[0] = gl_buffer_uv[1] = 0; gl_buffersize_uv = 0;
gl_bufferptr_uv[0] = gl_bufferptr_uv[1] = 0;
-#ifndef GL_WIN32
+#ifdef CONFIG_X11
if (mesa_bufferptr)
FreeMemoryMESA(mDisplay, mScreen, mesa_bufferptr);
#endif
@@ -559,6 +559,10 @@ glconfig:
uninitGl();
if (setGlWindow(&gl_vinfo, &gl_context, vo_window) == SET_WINDOW_FAILED)
return -1;
+ if (mesa_buffer && !AllocateMemoryMESA) {
+ mp_msg(MSGT_VO, MSGL_ERR, "Can not enable mesa-buffer because AllocateMemoryMESA was not found\n");
+ mesa_buffer = 0;
+ }
initGl(vo_dwidth, vo_dheight);
return 0;
@@ -763,13 +767,13 @@ static uint32_t get_image(mp_image_t *mpi) {
mpi->stride[0] = mpi->width * mpi->bpp / 8;
needed_size = mpi->stride[0] * mpi->height;
if (mesa_buffer) {
-#ifndef GL_WIN32
+#ifdef CONFIG_X11
if (mesa_bufferptr && needed_size > mesa_buffersize) {
FreeMemoryMESA(mDisplay, mScreen, mesa_bufferptr);
mesa_bufferptr = NULL;
}
if (!mesa_bufferptr)
- mesa_bufferptr = AllocateMemoryMESA(mDisplay, mScreen, needed_size, 0, 0, 0);
+ mesa_bufferptr = AllocateMemoryMESA(mDisplay, mScreen, needed_size, 0, 1.0, 1.0);
mesa_buffersize = needed_size;
#endif
mpi->planes[0] = mesa_bufferptr;