diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c index 50073265a2..b0afacb64f 100644 --- a/gst-libs/gst/gl/gstgldisplay.c +++ b/gst-libs/gst/gl/gstgldisplay.c @@ -258,7 +258,7 @@ gst_gl_display_init (GstGLDisplay *display, GstGLDisplayClass *klass) " y=1.1643*(y-0.0625);\n" " u=u-0.5;\n" " v=v-0.5;\n" - " r=clamp(y+1.5958*v+0.8, 0, 1);\n" + " r=clamp(y+1.5958*v, 0, 1);\n" " g=clamp(y-0.39173*u-0.81290*v, 0, 1);\n" " b=clamp(y+2.017*u, 0, 1);\n" " gl_FragColor=vec4(r,g,b,1.0);\n" @@ -584,15 +584,15 @@ gst_gl_display_thread_destroy_context (GstGLDisplay *display) glDeleteTextures (1, &display->upload_intex); display->upload_intex = 0; } - if (display->upload_intex_v != 0) + if (display->upload_intex_u != 0) { - glDeleteTextures (1, &display->upload_intex_v); - display->upload_intex = 0; + glDeleteTextures (1, &display->upload_intex_u); + display->upload_intex_u = 0; } if (display->upload_intex_v != 0) { glDeleteTextures (1, &display->upload_intex_v); - display->upload_intex = 0; + display->upload_intex_v = 0; } GST_INFO ("Cleaning texture pool"); @@ -2201,22 +2201,15 @@ gst_gl_display_thread_do_upload_fill (GstGLDisplay *display) offsetV = 2; break; case GST_VIDEO_FORMAT_YV12: - //WIN32 + #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) + //WIN32 offsetU = 2; offsetV = 1; - //LINUX #else - if (g_ascii_strncasecmp ("ATI", (gchar *) glGetString (GL_VENDOR), 3) == 0) - { - offsetU = 2; - offsetV = 1; - } - else - { - offsetU = 1; - offsetV = 2; - } + //LINUX + offsetU = 1; + offsetV = 2; #endif break; default: @@ -2661,22 +2654,14 @@ gst_gl_display_thread_do_download_draw_yuv (GstGLDisplay *display) offsetV = 2; break; case GST_VIDEO_FORMAT_YV12: - //WIN32 #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) + //WIN32 offsetU = 2; offsetV = 1; - //LINUX #else - if (g_ascii_strncasecmp ("ATI", (gchar *) glGetString (GL_VENDOR), 3) == 0) - { - offsetU = 2; - offsetV = 1; - } - else - { - offsetU = 1; - offsetV = 2; - } + //LINUX + offsetU = 1; + offsetV = 2; #endif break; default: diff --git a/gst-libs/gst/gl/gstglwindow_x11.c b/gst-libs/gst/gl/gstglwindow_x11.c index d9be57e3db..9c5af6aa07 100644 --- a/gst-libs/gst/gl/gstglwindow_x11.c +++ b/gst-libs/gst/gl/gstglwindow_x11.c @@ -24,6 +24,8 @@ #include "gstglwindow.h" +#include + #include #define GST_GL_WINDOW_GET_PRIVATE(o) \ @@ -276,6 +278,8 @@ gst_gl_window_new (gint width, gint height) static gint x = 0; static gint y = 0; + setlocale(LC_NUMERIC, "C"); + priv->x_lock = g_mutex_new (); priv->cond_send_message = g_cond_new (); priv->running = TRUE;