mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
audiosrc: Fill in the correct silence
For unsigned raw formats this is not all zeroes, and for non-raw formats we just continue to assume all zeroes for now. https://bugzilla.gnome.org/show_bug.cgi?id=739446
This commit is contained in:
parent
f0f854d501
commit
e63ad51dab
1 changed files with 8 additions and 1 deletions
|
@ -393,7 +393,14 @@ gst_audio_src_ring_buffer_acquire (GstAudioRingBuffer * buf,
|
|||
goto could_not_open;
|
||||
|
||||
buf->size = spec->segtotal * spec->segsize;
|
||||
buf->memory = g_malloc0 (buf->size);
|
||||
buf->memory = g_malloc (buf->size);
|
||||
if (buf->spec.type == GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW) {
|
||||
gst_audio_format_fill_silence (buf->spec.info.finfo, buf->memory,
|
||||
buf->size);
|
||||
} else {
|
||||
/* FIXME, non-raw formats get 0 as the empty sample */
|
||||
memset (buf->memory, 0, buf->size);
|
||||
}
|
||||
|
||||
abuf = GST_AUDIO_SRC_RING_BUFFER (buf);
|
||||
abuf->running = TRUE;
|
||||
|
|
Loading…
Reference in a new issue