diff options
author | Luca Abeni <lucabe72@email.it> | 2007-11-19 07:54:04 +0000 |
---|---|---|
committer | Luca Abeni <lucabe72@email.it> | 2007-11-19 07:54:04 +0000 |
commit | 9f74582cea3fd626737cd6785f8ae1da2491fab5 (patch) | |
tree | ccae6223d8b2d5ebafadddde6b70bbcaf8bf4aca /libavformat/audio.c | |
parent | 7f0cd6a5293ff7608b3725f4dcc6ad141030cc4f (diff) |
Do not use perror() in audio, video, and DV grabbers
Originally committed as revision 11058 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/audio.c')
-rw-r--r-- | libavformat/audio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/audio.c b/libavformat/audio.c index 6122b8be00..151cbffd51 100644 --- a/libavformat/audio.c +++ b/libavformat/audio.c @@ -58,7 +58,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device) else audio_fd = open(audio_device, O_RDONLY); if (audio_fd < 0) { - perror(audio_device); + av_log(NULL, AV_LOG_ERROR, "%s: %s\n", audio_device, strerror(errno)); return AVERROR(EIO); } @@ -114,14 +114,14 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device) } err=ioctl(audio_fd, SNDCTL_DSP_SETFMT, &tmp); if (err < 0) { - perror("SNDCTL_DSP_SETFMT"); + av_log(NULL, AV_LOG_ERROR, "SNDCTL_DSP_SETFMT: %s\n", strerror(errno)); goto fail; } tmp = (s->channels == 2); err = ioctl(audio_fd, SNDCTL_DSP_STEREO, &tmp); if (err < 0) { - perror("SNDCTL_DSP_STEREO"); + av_log(NULL, AV_LOG_ERROR, "SNDCTL_DSP_STEREO: %s\n", strerror(errno)); goto fail; } if (tmp) @@ -130,7 +130,7 @@ static int audio_open(AudioData *s, int is_output, const char *audio_device) tmp = s->sample_rate; err = ioctl(audio_fd, SNDCTL_DSP_SPEED, &tmp); if (err < 0) { - perror("SNDCTL_DSP_SPEED"); + av_log(NULL, AV_LOG_ERROR, "SNDCTL_DSP_SPEED: %s\n", strerror(errno)); goto fail; } s->sample_rate = tmp; /* store real sample rate */ |