Commit 29973b7d authored by Haihua Hu's avatar Haihua Hu Committed by Tim-Philipp Müller

glvidemixer: need reconfigure output gemotry after caps renegotiated

parent 9fbd1930
......@@ -1161,6 +1161,9 @@ gst_gl_video_mixer_init_shader (GstGLMixer * mixer, GstCaps * outcaps)
if (video_mixer->shader)
gst_object_unref (video_mixer->shader);
/* need reconfigure output geometry */
video_mixer->output_geo_change = TRUE;
return gst_gl_context_gen_shader (GST_GL_BASE_MIXER (mixer)->context,
gst_gl_shader_string_vertex_mat4_vertex_transform,
video_mixer_f_src, &video_mixer->shader);
......@@ -1483,7 +1486,8 @@ gst_gl_video_mixer_callback (gpointer stuff)
_init_vbo_indices (video_mixer);
if (pad->geometry_change || !pad->vertex_buffer) {
if (video_mixer->output_geo_change
|| pad->geometry_change || !pad->vertex_buffer) {
gint pad_width, pad_height;
gfloat w, h;
......@@ -1551,6 +1555,8 @@ gst_gl_video_mixer_callback (gpointer stuff)
walk = g_list_next (walk);
}
video_mixer->output_geo_change = FALSE;
GST_OBJECT_UNLOCK (video_mixer);
gl->DisableVertexAttribArray (attr_position_loc);
......
......@@ -126,6 +126,8 @@ struct _GstGLVideoMixer
GLuint vbo_indices;
GLuint checker_vbo;
GstGLMemory *out_tex;
gboolean output_geo_change;
};
struct _GstGLVideoMixerClass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment