volume: use transform_ip_on_passthrough

This commit is contained in:
Wim Taymans 2012-04-02 11:11:33 +02:00
parent 6e9d28eef6
commit bf908a385b

View file

@ -405,6 +405,8 @@ gst_volume_class_init (GstVolumeClass * klass)
trans_class->before_transform = GST_DEBUG_FUNCPTR (volume_before_transform); trans_class->before_transform = GST_DEBUG_FUNCPTR (volume_before_transform);
trans_class->transform_ip = GST_DEBUG_FUNCPTR (volume_transform_ip); trans_class->transform_ip = GST_DEBUG_FUNCPTR (volume_transform_ip);
trans_class->stop = GST_DEBUG_FUNCPTR (volume_stop); trans_class->stop = GST_DEBUG_FUNCPTR (volume_stop);
trans_class->transform_ip_on_passthrough = FALSE;
filter_class->setup = GST_DEBUG_FUNCPTR (volume_setup); filter_class->setup = GST_DEBUG_FUNCPTR (volume_setup);
} }
@ -810,9 +812,8 @@ volume_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
if (G_UNLIKELY (!self->negotiated)) if (G_UNLIKELY (!self->negotiated))
goto not_negotiated; goto not_negotiated;
/* don't process data in passthrough-mode */ /* don't process data with GAP */
if (gst_base_transform_is_passthrough (base) || if (GST_BUFFER_FLAG_IS_SET (outbuf, GST_BUFFER_FLAG_GAP))
GST_BUFFER_FLAG_IS_SET (outbuf, GST_BUFFER_FLAG_GAP))
return GST_FLOW_OK; return GST_FLOW_OK;
gst_buffer_map (outbuf, &map, GST_MAP_READWRITE); gst_buffer_map (outbuf, &map, GST_MAP_READWRITE);