gst/volume/gstvolume.c: Return NOT_NEGOTIATED if we didn't set a process function...
authorSebastian Dröge <slomo@circular-chaos.org>
Tue, 6 May 2008 12:35:09 +0000 (12:35 +0000)
committerSebastian Dröge <slomo@circular-chaos.org>
Tue, 6 May 2008 12:35:09 +0000 (12:35 +0000)
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
gst/volume/gstvolume.c

index 657c41b..5c32c2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2008-05-06  Sebastian Dröge  <slomo@circular-chaos.org>
 
+       * 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  <slomo@circular-chaos.org>
+
        Based on a patch by: Tim-Philipp Müller  <tim.muller at collabora co uk>
 
        * gst/audioconvert/audioconvert.c: (audio_convert_prepare_context):
index b5bceb4..c167f0f 100644 (file)
@@ -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.
    */