mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
pitch: Fix race between putSamples() and setting soundtouch parameters
The various soundtouch set*() functions may cause buffer (re)allocations which interferes with inputting the audio data.
This commit is contained in:
parent
db157428ee
commit
52f736c233
1 changed files with 2 additions and 0 deletions
|
@ -876,7 +876,9 @@ gst_pitch_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
|
|||
}
|
||||
|
||||
gst_buffer_map (buffer, &info, GST_MAP_READ);
|
||||
GST_OBJECT_LOCK (pitch);
|
||||
priv->st->putSamples ((soundtouch::SAMPLETYPE *) info.data, info.size / pitch->info.bpf);
|
||||
GST_OBJECT_UNLOCK (pitch);
|
||||
gst_buffer_unmap (buffer, &info);
|
||||
gst_buffer_unref (buffer);
|
||||
|
||||
|
|
Loading…
Reference in a new issue