Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALSA return code being incorrectly checked #4188

Closed
danw-volley opened this issue Feb 27, 2017 · 1 comment
Closed

ALSA return code being incorrectly checked #4188

danw-volley opened this issue Feb 27, 2017 · 1 comment

Comments

@danw-volley
Copy link

mpv version and platform

Git master HEAD 2b6ac86

Reproduction steps

Code Review

Expected behavior

Check the correct ALSA return value

Actual behavior

Check the wrong ALSA return value

Log file

In audio/out/ao_alsa.c starting on line 1123 there is this code:

        unsigned short revents;
        snd_pcm_poll_descriptors_revents(p->alsa, fds, num_fds, &revents);
        CHECK_ALSA_ERROR("cannot read poll events");

The results of snd_pcm_poll_descriptors_revents is not being stored in the err variable, so the macro is not checking the correct return value. I believe it should be:

        unsigned short revents;
        err = snd_pcm_poll_descriptors_revents(p->alsa, fds, num_fds, &revents);
        CHECK_ALSA_ERROR("cannot read poll events");
@ghost ghost closed this as completed in 6ace321 Feb 27, 2017
@ghost
Copy link

ghost commented Feb 27, 2017

That's probably right.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant