]> git.sesse.net Git - vlc/commitdiff
auhal: do not check for changed streams if selected device is 0
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Sun, 23 Feb 2014 18:18:36 +0000 (19:18 +0100)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Mon, 24 Feb 2014 14:08:13 +0000 (15:08 +0100)
modules/audio_output/auhal.c

index 3078c1af527e18a5546839976fbbaa3eac1d48c7..b6958a42701f129d73be8a9ddc645f905e967ba2 100644 (file)
@@ -1490,6 +1490,10 @@ static OSStatus StreamsChangedListener(AudioObjectID inObjectID,  UInt32 inNumbe
     msg_Dbg(p_aout, "available physical formats for audio device changed");
     RebuildDeviceList(p_aout);
 
+    /* In this case audio has not yet started. Below code will not work and is not needed here. */
+    if (p_sys->i_selected_dev == 0)
+        return 0;
+
     /*
      * check if changed stream id belongs to current device
      */