Skip to content

[0.4.x] libvisual-plugins: Fix ALSA input plugin - #154

Merged
hartwork merged 7 commits into
0.4.xfrom
0.4.x-fix-alsa-input
Jan 14, 2023
Merged

hartwork merged 7 commits into
0.4.xfrom
0.4.x-fix-alsa-input

Conversation

@hartwork

@hartwork hartwork commented Jan 7, 2023

Copy link
Copy Markdown
Member

Should ideally be merged after pull request #152 or it will further increase the buffer overflow problem that #152 is fixing.

@hartwork hartwork added the bug label Jan 7, 2023
@hartwork hartwork added this to the 0.4.2 milestone Jan 7, 2023
@hartwork
hartwork force-pushed the 0.4.x-fix-alsa-input branch from 6387398 to 295d0d1 Compare January 13, 2023 22:04
@hartwork
hartwork requested a review from kaixiong January 13, 2023 22:04
@hartwork
hartwork force-pushed the 0.4.x-fix-alsa-input branch from 295d0d1 to 271e815 Compare January 14, 2023 16:03
@hartwork

Copy link
Copy Markdown
Member Author

@kaixiong conflicts fixed and rebased onto latest 0.4.x.

}

tmp = 1000000*4;
tmp = 1000 * 1000 / inp_alsa_var_samplerate * inp_alsa_var_frames_target; // in micro seconds

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This suffers from the integer division problem above.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed above at #154 (comment)

@kaixiong kaixiong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hartwork, I added some comments regarding the rewritten formulas.

@hartwork
hartwork force-pushed the 0.4.x-fix-alsa-input branch from 271e815 to 7e8d9d7 Compare January 14, 2023 19:44
@hartwork
hartwork requested a review from kaixiong January 14, 2023 19:46
@hartwork
hartwork force-pushed the 0.4.x-fix-alsa-input branch from 7e8d9d7 to dc6e9c5 Compare January 14, 2023 19:49

@kaixiong kaixiong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. Looks like it also fixes a leak with strdup() on the ALSA device string.

@hartwork

hartwork commented Jan 14, 2023 •

Copy link
Copy Markdown
Member Author

@kaixiong glad you like it, thanks for the review! Let me check how much can and needs to be forward-ported to master.

@hartwork
hartwork merged commit 518f3fd into 0.4.x Jan 14, 2023
@hartwork
hartwork deleted the 0.4.x-fix-alsa-input branch January 14, 2023 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants