Livestream: add silent audio track if not audio input is provided (fixes youtube and other sites)

This commit is contained in:
dec05eba
2022-10-04 00:29:59 +02:00
parent c354d88583
commit e80d7676d4
3 changed files with 42 additions and 9 deletions

View File

@@ -283,7 +283,9 @@ int sound_device_get_by_name(SoundDevice *device, const char *device_name, const
}
void sound_device_close(SoundDevice *device) {
pa_sound_device_free((pa_handle*)device->handle);
if(device->handle)
pa_sound_device_free((pa_handle*)device->handle);
device->handle = NULL;
}
int sound_device_read_next_chunk(SoundDevice *device, void **buffer) {