lavd/pulse_audio_dec: use default source when no input provided
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Wed, 6 Aug 2014 23:58:55 +0000 (01:58 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 18 Aug 2014 20:36:46 +0000 (22:36 +0200)
PulseAudio expilitly requires name of the source.
This patch makes it use default source when not provided.
It simplifies programistic use.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/pulse_audio_dec.c

index 01ff6d1..a7b0e5d 100644 (file)
@@ -154,7 +154,7 @@ static av_cold int pulse_read_header(AVFormatContext *s)
 
     attr.fragsize = pd->fragment_size;
 
-    if (strcmp(s->filename, "default"))
+    if (s->filename[0] != '\0' && strcmp(s->filename, "default"))
         device = s->filename;
 
     if (!(pd->mainloop = pa_threaded_mainloop_new())) {