mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
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.
This commit is contained in:
parent
f564ebf8cb
commit
816466b67f
1 changed files with 8 additions and 0 deletions
|
@ -276,6 +276,10 @@ gst_speex_resample_update_state (GstSpeexResample * resample, gint channels,
|
||||||
gint inrate, gint outrate, gint quality, gboolean fp)
|
gint inrate, gint outrate, gint quality, gboolean fp)
|
||||||
{
|
{
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
gboolean updated_latency = FALSE;
|
||||||
|
|
||||||
|
updated_latency = (resample->inrate != inrate
|
||||||
|
|| quality != resample->quality);
|
||||||
|
|
||||||
if (resample->state == NULL) {
|
if (resample->state == NULL) {
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
@ -320,6 +324,10 @@ gst_speex_resample_update_state (GstSpeexResample * resample, gint channels,
|
||||||
resample->inrate = inrate;
|
resample->inrate = inrate;
|
||||||
resample->outrate = outrate;
|
resample->outrate = outrate;
|
||||||
|
|
||||||
|
if (updated_latency)
|
||||||
|
gst_element_post_message (GST_ELEMENT (resample),
|
||||||
|
gst_message_new_latency (GST_OBJECT (resample)));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue