mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
rawmidi: fix the params_mode check condition in snd_rawmidi_tread()
The condition should be obviously reversed.
Reported-by: Mark ZurSchmiede <zursch@gmail.com>
Fixes: 5ac61983 ("rawmidi: allow timestamp reads only for the appropriate read mode")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
f91c89da99
commit
917f412484
1 changed files with 1 additions and 1 deletions
|
|
@ -1114,7 +1114,7 @@ ssize_t snd_rawmidi_tread(snd_rawmidi_t *rawmidi, struct timespec *tstamp, void
|
|||
assert(rawmidi);
|
||||
assert(rawmidi->stream == SND_RAWMIDI_STREAM_INPUT);
|
||||
assert(buffer || size == 0);
|
||||
if ((rawmidi->params_mode & SNDRV_RAWMIDI_MODE_FRAMING_MASK) == SNDRV_RAWMIDI_MODE_FRAMING_TSTAMP)
|
||||
if ((rawmidi->params_mode & SNDRV_RAWMIDI_MODE_FRAMING_MASK) != SNDRV_RAWMIDI_MODE_FRAMING_TSTAMP)
|
||||
return -EINVAL;
|
||||
if (rawmidi->ops->tread == NULL)
|
||||
return -ENOTSUP;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue