mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
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>
This commit is contained in:
parent
fc19edd8f5
commit
39133efc1b
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user