Mercurial > mplayer.hg
changeset 16113:c81b7c1c14cb
catch failed buffer allocation
author | reimar |
---|---|
date | Tue, 26 Jul 2005 20:36:34 +0000 |
parents | 0aeb954fc11c |
children | ab6119582b54 |
files | libvo/vo_gl.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_gl.c Tue Jul 26 18:55:20 2005 +0000 +++ b/libvo/vo_gl.c Tue Jul 26 20:36:34 2005 +0000 @@ -485,6 +485,7 @@ if (!err_shown) mp_msg(MSGT_VO, MSGL_ERR, "[gl] extensions missing for dr\n" "Expect a _major_ speed penalty\n"); + err_shown = 1; return VO_FALSE; } if (mpi->flags & MP_IMGFLAG_READABLE) return VO_FALSE; @@ -498,6 +499,13 @@ } mpi->planes[0] = MapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY); BindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); + if (mpi->planes[0] == NULL) { + if (!err_shown) + mp_msg(MSGT_VO, MSGL_ERR, "[gl] could not aquire buffer for dr\n" + "Expect a _major_ speed penalty\n"); + err_shown = 1; + return VO_FALSE; + } mpi->flags |= MP_IMGFLAG_DIRECT; return VO_TRUE; }