X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavdevice%2Foss_audio.c;h=1f8b5e762cd58db77000191d93be9ed00883fc08;hp=951acbcc368ddb6f26dff1b8296c0cf2b76f0237;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavdevice/oss_audio.c b/ffmpeg/libavdevice/oss_audio.c index 951acbc..1f8b5e7 100644 --- a/ffmpeg/libavdevice/oss_audio.c +++ b/ffmpeg/libavdevice/oss_audio.c @@ -55,7 +55,7 @@ int ff_oss_audio_open(AVFormatContext *s1, int is_output, else audio_fd = avpriv_open(audio_device, O_RDONLY); if (audio_fd < 0) { - av_log(s1, AV_LOG_ERROR, "%s: %s\n", audio_device, strerror(errno)); + av_log(s1, AV_LOG_ERROR, "%s: %s\n", audio_device, av_err2str(AVERROR(errno))); return AVERROR(EIO); } @@ -66,7 +66,7 @@ int ff_oss_audio_open(AVFormatContext *s1, int is_output, /* non blocking mode */ if (!is_output) { if (fcntl(audio_fd, F_SETFL, O_NONBLOCK) < 0) { - av_log(s1, AV_LOG_WARNING, "%s: Could not enable non block mode (%s)\n", audio_device, strerror(errno)); + av_log(s1, AV_LOG_WARNING, "%s: Could not enable non block mode (%s)\n", audio_device, av_err2str(AVERROR(errno))); } } @@ -74,17 +74,17 @@ int ff_oss_audio_open(AVFormatContext *s1, int is_output, #define CHECK_IOCTL_ERROR(event) \ if (err < 0) { \ - av_log(s1, AV_LOG_ERROR, #event ": %s\n", strerror(errno)); \ + av_log(s1, AV_LOG_ERROR, #event ": %s\n", av_err2str(AVERROR(errno)));\ goto fail; \ } /* select format : favour native format * We don't CHECK_IOCTL_ERROR here because even if failed OSS still may be * usable. If OSS is not usable the SNDCTL_DSP_SETFMTS later is going to - * fail anyway. `err =` kept to eliminate compiler warning. */ + * fail anyway. */ err = ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &tmp); if (err < 0) { - av_log(s1, AV_LOG_WARNING, "SNDCTL_DSP_GETFMTS: %s\n", strerror(errno)); + av_log(s1, AV_LOG_WARNING, "SNDCTL_DSP_GETFMTS: %s\n", av_err2str(AVERROR(errno))); } #if HAVE_BIGENDIAN