From 96602f4e349bfa3b75109dd8d3c2418f37e986e5 Mon Sep 17 00:00:00 2001
From: Lukasz Marek <lukasz.m.luki2@gmail.com>
Date: Thu, 7 Aug 2014 01:58:55 +0200
Subject: lavd/pulse_audio_dec: use default source when no input provided

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c
index 01ff6d1711..a7b0e5d8c1 100644
--- a/libavdevice/pulse_audio_dec.c
+++ b/libavdevice/pulse_audio_dec.c
@@ -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())) {
-- 
cgit v1.2.3