mirror of
https://github.com/mpv-player/mpv
synced 2025-03-25 04:38:01 +00:00
Make genEOSD behaviour with NULL data more explicit
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19941 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
2dd3f3f55a
commit
4e6749d0ef
@ -251,10 +251,10 @@ static void genEOSD(ass_image_t *img) {
|
||||
GLint scale_type = (scaled_osd) ? GL_LINEAR : GL_NEAREST;
|
||||
ass_image_t *i;
|
||||
clearEOSD();
|
||||
if (!img)
|
||||
return;
|
||||
for (i = img; i; i = i->next)
|
||||
eosdtexCnt++;
|
||||
if (!eosdtexCnt)
|
||||
return;
|
||||
eosdtex = calloc(eosdtexCnt, sizeof(GLuint));
|
||||
glGenTextures(eosdtexCnt, eosdtex);
|
||||
for (i = img, curtex = eosdtex; i; i = i->next, curtex++) {
|
||||
|
Loading…
Reference in New Issue
Block a user