Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-31 23:01:07 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-07-31 23:19:15 +0400
commit39133efc1b991d91683f7cc36d2ef32896556aa1 (patch)
tree876f782516fe98dd8421e5aa002a0962b962690a /libavdevice/oss_audio.c
parentfc19edd8f50051aad44ff85b736aecc57cb3abee (diff)
avdevice/oss_audio: Check SNDCTL_DSP_GETFMTS failure, print a warning but continue
Found-by: CSA and Timothy Gu <timothygu99@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/oss_audio.c')
-rw-r--r--libavdevice/oss_audio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavdevice/oss_audio.c b/libavdevice/oss_audio.c
index d27da85812..951acbcc36 100644
--- a/libavdevice/oss_audio.c
+++ b/libavdevice/oss_audio.c
@@ -83,6 +83,9 @@ int ff_oss_audio_open(AVFormatContext *s1, int is_output,
* usable. If OSS is not usable the SNDCTL_DSP_SETFMTS later is going to
* fail anyway. `err =` kept to eliminate compiler warning. */
err = ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &tmp);
+ if (err < 0) {
+ av_log(s1, AV_LOG_WARNING, "SNDCTL_DSP_GETFMTS: %s\n", strerror(errno));
+ }
#if HAVE_BIGENDIAN
if (tmp & AFMT_S16_BE) {