summaryrefslogtreecommitdiffstats
path: root/gst/speexresample
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2007-11-23 10:01:33 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-11-23 10:01:33 +0000
commitd96e11806a6350ba56fd32d5d34e1b5ba0e839e9 (patch)
tree5ffdcd5fc3a80b38afc188b818527e8981fba2bc /gst/speexresample
parente8182f4d33a93374e586127e88c3d18fd9c13ffc (diff)
downloadgst-plugins-bad-d96e11806a6350ba56fd32d5d34e1b5ba0e839e9.tar.gz
gst-plugins-bad-d96e11806a6350ba56fd32d5d34e1b5ba0e839e9.tar.bz2
gst-plugins-bad-d96e11806a6350ba56fd32d5d34e1b5ba0e839e9.zip
gst/speexresample/gstspeexresample.c: Also post GST_MESSAGE_LATENCY if the latency changes.
Original commit message from CVS: * gst/speexresample/gstspeexresample.c: (gst_speex_resample_update_state): Also post GST_MESSAGE_LATENCY if the latency changes.
Diffstat (limited to 'gst/speexresample')
-rw-r--r--gst/speexresample/gstspeexresample.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gst/speexresample/gstspeexresample.c b/gst/speexresample/gstspeexresample.c
index da029c56..02738f6f 100644
--- a/gst/speexresample/gstspeexresample.c
+++ b/gst/speexresample/gstspeexresample.c
@@ -276,6 +276,10 @@ gst_speex_resample_update_state (GstSpeexResample * resample, gint channels,
gint inrate, gint outrate, gint quality, gboolean fp)
{
gboolean ret = TRUE;
+ gboolean updated_latency = FALSE;
+
+ updated_latency = (resample->inrate != inrate
+ || quality != resample->quality);
if (resample->state == NULL) {
ret = TRUE;
@@ -320,6 +324,10 @@ gst_speex_resample_update_state (GstSpeexResample * resample, gint channels,
resample->inrate = inrate;
resample->outrate = outrate;
+ if (updated_latency)
+ gst_element_post_message (GST_ELEMENT (resample),
+ gst_message_new_latency (GST_OBJECT (resample)));
+
return ret;
}