guint out_tex;
guint array_index = 0;
guint i;
+ gboolean res;
GST_TRACE ("Processing buffers");
GST_VIDEO_FRAME_HEIGHT (&out_frame))) {
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND,
("%s", "Failed to init upload format"), (NULL));
- return FALSE;
+ res = FALSE;
+ goto out;
}
}
if (!gst_video_frame_map (in_frame, &pad->in_info, mixcol->buffer,
GST_MAP_READ | GST_MAP_GL)) {
++array_index;
+ pad->mapped = FALSE;
continue;
}
+ pad->mapped = TRUE;
if (gst_is_gl_memory (in_frame->map[0].memory)) {
in_tex = *(guint *) in_frame->data[0];
in_width, in_height, in_width, in_height)) {
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND,
("%s", "Failed to init upload format"), (NULL));
- return FALSE;
+ res = FALSE;
+ goto out;
}
if (!pad->in_tex_id)
in_frame->data)) {
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND,
("%s", "Failed to upload video frame"), (NULL));
- return FALSE;
+ res = FALSE;
+ goto out;
}
in_tex = pad->in_tex_id;
- pad->mapped = TRUE;
}
frame->texture = in_tex;
out_frame.data)) {
GST_ELEMENT_ERROR (mix, RESOURCE, NOT_FOUND, ("%s",
"Failed to download video frame"), (NULL));
- return FALSE;
+ res = FALSE;
+ goto out;
}
}
+out:
i = 0;
walk = mix->sinkpads;
while (walk) {
gst_video_frame_unmap (&out_frame);
- return TRUE;
+ return res;
}
static void