again fixed crash with start recording

This commit is contained in:
jojo61 2018-10-11 19:47:38 +02:00
parent e28a865f1c
commit 961332309c

View File

@ -1764,7 +1764,7 @@ static void CuvidDestroySurfaces(CuvidDecoder * decoder)
glXMakeCurrent(XlibDisplay, VideoWindow, GlxContext); glXMakeCurrent(XlibDisplay, VideoWindow, GlxContext);
GlxCheck(); GlxCheck();
if (decoder->cuda_ctx) {
for (i=0;i<decoder->SurfacesNeeded;i++) { for (i=0;i<decoder->SurfacesNeeded;i++) {
for (j=0;j<2;j++) { for (j=0;j<2;j++) {
if (decoder->cu_res[i][j]) { if (decoder->cu_res[i][j]) {
@ -1773,6 +1773,7 @@ static void CuvidDestroySurfaces(CuvidDecoder * decoder)
} }
} }
} }
}
glDeleteTextures(CODEC_SURFACES_MAX*2,(GLuint*)&decoder->gl_textures); glDeleteTextures(CODEC_SURFACES_MAX*2,(GLuint*)&decoder->gl_textures);