]> git.sesse.net Git - movit/blobdiff - ycbcr_input.cpp
Do not send NULL to glTexSubImage2D if there is no input data set; it is illegal...
[movit] / ycbcr_input.cpp
index 071ce134833151b33bbb9cce800c1971143106dc..b0ca69291198fc69b7badc37b35b30d92741930c 100644 (file)
@@ -62,7 +62,7 @@ void YCbCrInput::set_gl_state(GLuint glsl_program_num, const string& prefix, uns
                glActiveTexture(GL_TEXTURE0 + *sampler_num + channel);
                check_error();
 
-               if (texture_num[channel] == 0) {
+               if (texture_num[channel] == 0 && (pbos[channel] != 0 || pixel_data[channel] != NULL)) {
                        GLenum format, internal_format;
                        if (channel == 1 && ycbcr_input_splitting == YCBCR_INPUT_SPLIT_Y_AND_CBCR) {
                                format = GL_RG;