Commit 47c4998c authored by Jean-Paul Saman's avatar Jean-Paul Saman

xvba_video_glx.c: Various fixes

- fix error path in create_hw_image_glx()
parent 8ae2becd
......@@ -175,6 +175,8 @@ static void *render_thread(void *arg)
XXX: this assumes the Catalyst driver can still share GLX
contexts from another Display struct, though actually the very
same underlying X11 display (XDisplayString() shall match). */
XInitThreads();
Display *x11_dpy;
x11_dpy = XOpenDisplay(driver_data->x11_dpy_name);
if (!x11_dpy) {
......@@ -382,9 +384,11 @@ create_hw_image_glx(
ASSERT(shader_fp_length > 0);
hwi->shader = gl_create_shader_object(shader_fp, shader_fp_length);
if (!hwi->shader)
if (!hwi->shader) {
destroy_hw_image_glx(driver_data, obj_image);
return VA_STATUS_ERROR_OPERATION_FAILED;
}
}
hwi->width = obj_image->xvba_width;
hwi->height = obj_image->xvba_height;
......@@ -401,6 +405,8 @@ commit_hw_image_glx(
)
{
object_image_glx_p const hwi = obj_image->hw.glx;
if (!hwi)
return VA_STATUS_ERROR_OPERATION_FAILED;
const int is_I420 = obj_image->image.format.fourcc == VA_FOURCC('I','4','2','0');
unsigned int offsets[3];
......
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