Mercurial > mplayer.hg
changeset 18584:212999db0203
Avoid crash with e.g. -vo gl2:yuv=2 when no fragment program functions are available
Fix "ported" from vo_gl.c
author | reimar |
---|---|
date | Mon, 05 Jun 2006 20:21:25 +0000 |
parents | b6444dfda51b |
children | 2dd3122e41f4 |
files | libvo/vo_gl2.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_gl2.c Mon Jun 05 19:00:23 2006 +0000 +++ b/libvo/vo_gl2.c Mon Jun 05 20:21:25 2006 +0000 @@ -765,6 +765,10 @@ glBindTexture(GL_TEXTURE_2D, 0); case YUV_CONVERSION_FRAGMENT_POW: case YUV_CONVERSION_FRAGMENT: + if (!GenPrograms || !BindProgram) { + mp_msg(MSGT_VO, MSGL_ERR, "[gl] fragment program functions missing!\n"); + break; + } GenPrograms(1, &fragprog); BindProgram(GL_FRAGMENT_PROGRAM, fragprog); break;