diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-04 21:23:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-05 00:28:21 +0100 |
commit | 1ba0d9b5d110bc785acbffea54c4e33993d26425 (patch) | |
tree | 8bbb3b2aeab13db2fb2aba42d9aad9ea9970f2db /libavdevice | |
parent | a0348d0966a81a66f3a1bf061576b24d5296b933 (diff) | |
download | ffmpeg-1ba0d9b5d110bc785acbffea54c4e33993d26425.tar.gz |
oss: warn when non block mode cannot be enabled.
Fixes CID732183
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/oss_audio.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavdevice/oss_audio.c b/libavdevice/oss_audio.c index 5c8b3b9727..aa40034ea9 100644 --- a/libavdevice/oss_audio.c +++ b/libavdevice/oss_audio.c @@ -76,8 +76,11 @@ static int audio_open(AVFormatContext *s1, int is_output, const char *audio_devi } /* non blocking mode */ - if (!is_output) - fcntl(audio_fd, F_SETFL, O_NONBLOCK); + 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)); + } + } s->frame_size = AUDIO_BLOCK_SIZE; |