summaryrefslogtreecommitdiff
path: root/gst/audiovisualizers
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-04-05 00:49:46 +0100
committerTim-Philipp Müller <tim@centricular.net>2013-04-05 00:53:54 +0100
commita84e2ccbb82746474f852c779e76d2ab513ea3ea (patch)
tree7193caa1692daef2947bb573c9d850cd6d2c9904 /gst/audiovisualizers
parentbf502f55020ee20a93cce88c1808f2943c26a657 (diff)
downloadgstreamer-plugins-bad-a84e2ccbb82746474f852c779e76d2ab513ea3ea.tar.gz
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
Diffstat (limited to 'gst/audiovisualizers')
-rw-r--r--gst/audiovisualizers/gstaudiovisualizer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/audiovisualizers/gstaudiovisualizer.c b/gst/audiovisualizers/gstaudiovisualizer.c
index 579b31407..4bb9b0877 100644
--- a/gst/audiovisualizers/gstaudiovisualizer.c
+++ b/gst/audiovisualizers/gstaudiovisualizer.c
@@ -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);
}
}