mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
audiotestsrc: fix crash when setting the wave property before having negotiated a format
https://bugzilla.gnome.org/show_bug.cgi?id=661911
This commit is contained in:
parent
1c10fbcd33
commit
a586547b0c
1 changed files with 7 additions and 1 deletions
|
@ -878,13 +878,19 @@ static const ProcessFunc violet_noise_funcs[] = {
|
|||
|
||||
/*
|
||||
* gst_audio_test_src_change_wave:
|
||||
* Assign function pointer of wave genrator.
|
||||
* Assign function pointer of wave generator.
|
||||
*/
|
||||
static void
|
||||
gst_audio_test_src_change_wave (GstAudioTestSrc * src)
|
||||
{
|
||||
gint idx;
|
||||
|
||||
/* not negotiated yet? */
|
||||
if (src->info.finfo == NULL) {
|
||||
src->process = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (GST_AUDIO_FORMAT_INFO_FORMAT (src->info.finfo)) {
|
||||
case GST_AUDIO_FORMAT_S16:
|
||||
idx = 0;
|
||||
|
|
Loading…
Reference in a new issue