mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
audiovisualizer: shaders assume 32bpp
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
This commit is contained in:
parent
bf502f5502
commit
a84e2ccbb8
1 changed files with 4 additions and 2 deletions
|
@ -1151,8 +1151,10 @@ gst_audio_visualizer_chain (GstPad * pad, GstObject * parent,
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue