projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0c69c4
)
pitch: Fix race between putSamples() and setting soundtouch parameters
author
Doug Nazar
<nazard@nazar.ca>
Fri, 9 Aug 2019 06:41:51 +0000
(
02:41
-0400)
committer
Tim-Philipp Müller
<tim@centricular.com>
Wed, 14 Aug 2019 17:39:47 +0000
(18:39 +0100)
The various soundtouch set*() functions may cause buffer (re)allocations
which interferes with inputting the audio data.
ext/soundtouch/gstpitch.cc
patch
|
blob
|
history
diff --git
a/ext/soundtouch/gstpitch.cc
b/ext/soundtouch/gstpitch.cc
index
4fbe0ab
..
89bab3f
100644
(file)
--- a/
ext/soundtouch/gstpitch.cc
+++ b/
ext/soundtouch/gstpitch.cc
@@
-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);