mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
audiosink: 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
ce8d261cd6
commit
f0f854d501
1 changed files with 11 additions and 1 deletions
|
@ -417,7 +417,17 @@ gst_audio_sink_ring_buffer_acquire (GstAudioRingBuffer * buf,
|
|||
spec->seglatency = spec->segtotal + 1;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue