aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice/audio.c
diff options
context:
space:
mode:
authorBenoit Fouet <benoit.fouet@free.fr>2009-01-20 08:01:32 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2009-01-20 08:01:32 +0000
commit0c26e964e95759e6c1705a33d9c76e599049dea9 (patch)
treefa99d92c7e28fd62c241e79f2e7e655708a25702 /libavdevice/audio.c
parentd99b81664b2f4d0f48227fc247e77fe286cf543e (diff)
downloadffmpeg-0c26e964e95759e6c1705a33d9c76e599049dea9.tar.gz
Use avf context in av_log, instead of NULL.
Originally committed as revision 16695 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavdevice/audio.c')
-rw-r--r--libavdevice/audio.c10
1 files 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 */