From 9f535a3f3c3dfae6abff50a4472b6422cfaa7b2e Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 2 Mar 2017 15:29:54 +0900 Subject: [PATCH] emotion - fix empty video data frame update when using vdpau accel fixes a segfault when using vdpau+gst and where the first frame seems to be empty/zero. @fix --- src/modules/evas/engines/gl_common/evas_gl_texture.c | 4 ++-- src/modules/evas/engines/gl_generic/evas_engine.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c index d8259eb..f4d747e 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c @@ -1954,7 +1954,7 @@ evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned i tex->ptv2 = ptv; // FIXME: works on lowest size 4 pixel high buffers. must also be multiple of 2 - if (tex->gc->shared->info.unpack_row_length) + if ((tex->gc->shared->info.unpack_row_length) && (rows[0] && rows[h])) { glPixelStorei(GL_UNPACK_ROW_LENGTH, rows[1] - rows[0]); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); @@ -1973,7 +1973,7 @@ evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned i return; _tex_sub_2d(tex->gc, 0, 0, w / 2, h / 2, tex->ptv->format, tex->ptv->dataformat, rows[h + (h / 2)]); } - else + else if (rows[0] && rows[h]) { unsigned int y; diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 412580e..d0c179e 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -1021,6 +1021,7 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data) im->cs.data = image_data; } evas_gl_common_image_dirty(im, 0, 0, 0, 0); + evas_gl_common_image_update(im->gc, im); break; default: ERR("colorspace %d is not supported here", im->cs.space); -- 2.7.4