From b9a285021c7df221bf5032285f215afcfb930ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 6 May 2008 12:35:09 +0000 Subject: [PATCH] gst/volume/gstvolume.c: Return NOT_NEGOTIATED if we didn't set a process function yet for some reason instead of cras... Original commit message from CVS: * gst/volume/gstvolume.c: (volume_transform_ip): Return NOT_NEGOTIATED if we didn't set a process function yet for some reason instead of crashing later. Might fix bug #509125. --- ChangeLog | 6 ++++++ gst/volume/gstvolume.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 657c41b76a..5c32c2fb44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-05-06 Sebastian Dröge + + * gst/volume/gstvolume.c: (volume_transform_ip): + Return NOT_NEGOTIATED if we didn't set a process function yet for some + reason instead of crashing later. Might fix bug #509125. + 2008-05-06 Sebastian Dröge Based on a patch by: Tim-Philipp Müller diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c index b5bceb4a5a..c167f0fbdd 100644 --- a/gst/volume/gstvolume.c +++ b/gst/volume/gstvolume.c @@ -689,6 +689,8 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf) GstVolume *this = GST_VOLUME (base); GstClockTime timestamp; + g_return_val_if_fail (this->process != NULL, GST_FLOW_NOT_NEGOTIATED); + /* FIXME: if controllers are bound, subdivide GST_BUFFER_SIZE into small * chunks for smooth fades, what is small? 1/10th sec. */