From 16c185bac6ca543acdbb65562c738195f986b4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 8 Sep 2012 22:56:56 +0100 Subject: [PATCH] libvisual: fix crashes and invalid writes in totem This reverts part of "visual: enable commented out code again." (commit 8222ba16c8f671dc03e24e7b60e3e703046e58c1). The shader code does indeed look broken (or rather, it makes assumptions that are not necessarily true here, namly that pixel stride is 4, for example), which makes totem very crashy and causes other weird behaviour. Also see https://bugzilla.gnome.org/show_bug.cgi?id=683527 --- ext/libvisual/gstaudiovisualizer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/libvisual/gstaudiovisualizer.c b/ext/libvisual/gstaudiovisualizer.c index ecdd21e3fc..458aa091dc 100644 --- a/ext/libvisual/gstaudiovisualizer.c +++ b/ext/libvisual/gstaudiovisualizer.c @@ -978,8 +978,10 @@ gst_audio_visualizer_chain (GstPad * pad, GstObject * parent, GST_ERROR_OBJECT (scope, "render failed"); 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); } }