diff options
author | ivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-08-11 17:10:57 +0000 |
---|---|---|
committer | ivo <ivo@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-08-11 17:10:57 +0000 |
commit | 51d4c3244629d82f44cf44073de306cfc18c19e9 (patch) | |
tree | 3a665ba26e526f9c7f6dac568877020a2d9ec355 | |
parent | 1ff914c6a9e3b6fa0f5cb0a25a65521a24116a18 (diff) |
replace calls to perror() with calls to mp_msg()
this will shut up mplayer -realy-quiet. ao_mpegpes is the first ao that is
tried and will almost always fail (unless you have the right hardware)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19368 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_mpegpes.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libao2/ao_mpegpes.c b/libao2/ao_mpegpes.c index 11ca8183c4..1737711e95 100644 --- a/libao2/ao_mpegpes.c +++ b/libao2/ao_mpegpes.c @@ -6,6 +6,7 @@ #include <fcntl.h> #include <unistd.h> #include <inttypes.h> +#include <errno.h> #include "config.h" @@ -108,28 +109,28 @@ static int init_device(int card) #endif if((vo_mpegpes_fd2 = open(ao_file,O_RDWR|O_NONBLOCK)) < 0) { - perror("DVB AUDIO DEVICE: "); + mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO DEVICE: %s\n", strerror(errno)); return -1; } if( (ioctl(vo_mpegpes_fd2,AUDIO_SELECT_SOURCE, AUDIO_SOURCE_MEMORY) < 0)) { - perror("DVB AUDIO SELECT SOURCE: "); + mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO SELECT SOURCE: %s\n", strerror(errno)); return -1; } if((ioctl(vo_mpegpes_fd2,AUDIO_PLAY) < 0)) { - perror("DVB AUDIO PLAY: "); + mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO PLAY: %s\n", strerror(errno)); return -1; } if((ioctl(vo_mpegpes_fd2,AUDIO_SET_AV_SYNC, true) < 0)) { - perror("DVB AUDIO SET AV SYNC: "); + mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO SET AV SYNC: %s\n", strerror(errno)); return -1; } //FIXME: in vo_mpegpes audio was inited as MUTEd if((ioctl(vo_mpegpes_fd2,AUDIO_SET_MUTE, false) < 0)) { - perror("DVB AUDIO SET MUTE: "); + mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO SET MUTE: %s\n", strerror(errno)); return -1; } return vo_mpegpes_fd2; @@ -170,7 +171,7 @@ static int preinit(const char *arg) vo_mpegpes_fd2=open(ao_file,O_WRONLY|O_CREAT,0666); if(vo_mpegpes_fd2<0) { - perror("ao_mpegpes"); + mp_msg(MSGT_VO, MSGL_ERR, "ao_mpegpes: %s\n", strerror(errno)); return -1; } return vo_mpegpes_fd2; @@ -190,7 +191,7 @@ static int my_ao_write(unsigned char* data,int len){ if(pfd[0].revents & POLLOUT){ int ret=write(vo_mpegpes_fd2,data,len); if(ret<=0){ - perror("write"); + mp_msg(MSGT_VO, MSGL_ERR, "ao_mpegpes write: %s\n", strerror(errno)); usleep(0); } else { len-=ret; |