[MPlayer-cvslog] r35294 - trunk/libao2/ao_alsa.c

reimar subversion at mplayerhq.hu
Tue Oct 30 18:28:34 CET 2012


Author: reimar
Date: Tue Oct 30 18:28:34 2012
New Revision: 35294

Log:
Try to make code a bit clearer.

Modified:
   trunk/libao2/ao_alsa.c

Modified: trunk/libao2/ao_alsa.c
==============================================================================
--- trunk/libao2/ao_alsa.c	Tue Oct 30 18:14:28 2012	(r35293)
+++ trunk/libao2/ao_alsa.c	Tue Oct 30 18:28:34 2012	(r35294)
@@ -787,13 +787,13 @@ static int play(void* data, int len, int
 	mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_TryingToResetSoundcard);
 	if ((res = snd_pcm_prepare(alsa_handler)) < 0) {
 	  mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_PcmPrepareError, snd_strerror(res));
-	  return 0;
 	  break;
 	}
+	res = 0;
       }
   } while (res == 0);
 
-  return res < 0 ? res : res * bytes_per_sample;
+  return res < 0 ? 0 : res * bytes_per_sample;
 }
 
 /* how many byes are free in the buffer */


More information about the MPlayer-cvslog mailing list