Backport fix for crashes and invalid writes in totem from libvisual
in -base, to minimise differences to version in -base and to make
sure the bug doesn't sneak back in later when the base class is
made public.
The shader code looks like it makes assumptions that are not
necessarily always true, even if they're true for now for the
existing elements, namly that pixel stride is 4, for example.
See https://bugzilla.gnome.org/show_bug.cgi?id=683527
if (!klass->render (scope, inbuf, &outframe)) {
ret = GST_FLOW_ERROR;
} else {
- /* run various post processing (shading and geometri transformation */
- if (scope->shader) {
+ /* run various post processing (shading and geometric transformation) */
+ /* FIXME: SHADER assumes 32bpp */
+ if (scope->shader &&
+ GST_VIDEO_INFO_COMP_PSTRIDE (&scope->vinfo, 0) == 4) {
scope->shader (scope, &outframe, &scope->tempframe);
}
}