mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
audio-converter: In passthrough, also don't copy if in and out block are the same
In and out array are usually different, they are stack allocated arrays. However the blocks inside them still can be the same. https://bugzilla.gnome.org/show_bug.cgi?id=775369
This commit is contained in:
parent
1631a38640
commit
71e819ae7d
1 changed files with 7 additions and 1 deletions
|
@ -851,8 +851,14 @@ converter_passthrough (GstAudioConverter * convert,
|
||||||
|
|
||||||
bytes = samples * (convert->in.bpf / convert->in.channels);
|
bytes = samples * (convert->in.bpf / convert->in.channels);
|
||||||
|
|
||||||
for (i = 0; i < chain->blocks; i++)
|
for (i = 0; i < chain->blocks; i++) {
|
||||||
|
if (out[i] == in[i]) {
|
||||||
|
g_assert (convert->in_place);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
memcpy (out[i], in[i], bytes);
|
memcpy (out[i], in[i], bytes);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < chain->blocks; i++)
|
for (i = 0; i < chain->blocks; i++)
|
||||||
gst_audio_format_fill_silence (convert->in.finfo, out[i], samples);
|
gst_audio_format_fill_silence (convert->in.finfo, out[i], samples);
|
||||||
|
|
Loading…
Reference in a new issue