From f1e75d8593139856abbcee0bd204cd44ff3fc425 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Wed, 22 Jun 2022 23:48:21 +0200 Subject: [PATCH] BugFix change texture input Stream Sources --- Stream.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Stream.cpp b/Stream.cpp index 83a29fe..dff95fd 100644 --- a/Stream.cpp +++ b/Stream.cpp @@ -511,9 +511,8 @@ GstClockTime Stream::position() void Stream::init_texture(guint index) { glActiveTexture(GL_TEXTURE0); - if (textureindex_) - glDeleteTextures(1, &textureindex_); - glGenTextures(1, &textureindex_); + if (textureindex_ < 1) + glGenTextures(1, &textureindex_); glBindTexture(GL_TEXTURE_2D, textureindex_); glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, width_, height_); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width_, height_,