mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 16:40:18 +00:00
ALSA - corrected passing empty config
This commit is contained in:
@@ -86,7 +86,7 @@ void * audio_cap_alsa_init(char *cfg)
|
||||
s->frame.sample_rate = 48000;
|
||||
s->frame.ch_count = 2;
|
||||
|
||||
if(cfg) {
|
||||
if(cfg && strlen(cfg) > 0) {
|
||||
name = cfg;
|
||||
}
|
||||
|
||||
|
||||
@@ -197,10 +197,11 @@ void * audio_play_alsa_init(char *cfg)
|
||||
char *name;
|
||||
|
||||
s = calloc(1, sizeof(struct state_alsa_playback));
|
||||
if(cfg)
|
||||
if(cfg && strlen(cfg) > 0) {
|
||||
name = cfg;
|
||||
else
|
||||
} else {
|
||||
name = "default";
|
||||
}
|
||||
rc = snd_pcm_open(&s->handle, name,
|
||||
SND_PCM_STREAM_PLAYBACK, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user