From 0c26e964e95759e6c1705a33d9c76e599049dea9 Mon Sep 17 00:00:00 2001 From: Benoit Fouet Date: Tue, 20 Jan 2009 08:01:32 +0000 Subject: [PATCH] Use avf context in av_log, instead of NULL. Originally committed as revision 16695 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavdevice/audio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavdevice/audio.c b/libavdevice/audio.c index 2b6c3e9569..8f3e678db0 100644 --- a/libavdevice/audio.c +++ b/libavdevice/audio.c @@ -65,7 +65,7 @@ static int audio_open(AVFormatContext *s1, int is_output, const char *audio_devi else audio_fd = open(audio_device, O_RDONLY); if (audio_fd < 0) { - av_log(NULL, AV_LOG_ERROR, "%s: %s\n", audio_device, strerror(errno)); + av_log(s1, AV_LOG_ERROR, "%s: %s\n", audio_device, strerror(errno)); return AVERROR(EIO); } @@ -115,27 +115,27 @@ static int audio_open(AVFormatContext *s1, int is_output, const char *audio_devi s->codec_id = CODEC_ID_PCM_S16BE; break; default: - av_log(NULL, AV_LOG_ERROR, "Soundcard does not support 16 bit sample format\n"); + av_log(s1, AV_LOG_ERROR, "Soundcard does not support 16 bit sample format\n"); close(audio_fd); return AVERROR(EIO); } err=ioctl(audio_fd, SNDCTL_DSP_SETFMT, &tmp); if (err < 0) { - av_log(NULL, AV_LOG_ERROR, "SNDCTL_DSP_SETFMT: %s\n", strerror(errno)); + av_log(s1, 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) { - av_log(NULL, AV_LOG_ERROR, "SNDCTL_DSP_STEREO: %s\n", strerror(errno)); + av_log(s1, AV_LOG_ERROR, "SNDCTL_DSP_STEREO: %s\n", strerror(errno)); goto fail; } tmp = s->sample_rate; err = ioctl(audio_fd, SNDCTL_DSP_SPEED, &tmp); if (err < 0) { - av_log(NULL, AV_LOG_ERROR, "SNDCTL_DSP_SPEED: %s\n", strerror(errno)); + av_log(s1, AV_LOG_ERROR, "SNDCTL_DSP_SPEED: %s\n", strerror(errno)); goto fail; } s->sample_rate = tmp; /* store real sample rate */