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

Fix: error handling in parsing sample freq in FFmpeg audio plugins #984

Merged

Conversation

ko80
Copy link
Contributor

@ko80 ko80 commented Sep 24, 2024

Commit 065923f ("Refactor FFmpeg audio plugin sample rate parsing") added a helper function for parsing the sample frequency. However, the error returned from the function was checked incorrectly (inverted). This led to a segmentation fault when starting FFmpeg with MTL audio plugins.

This commit fixes the error handling by checking if the return value is non zero.

Fixes: 065923f ("Refactor FFmpeg audio plugin sample rate parsing")

Change-type: DefectResolution

Commit 065923f ("Refactor FFmpeg audio plugin sample rate parsing")
added a helper function for parsing the sample frequency. However, the error
returned from the function was checked incorrectly (inverted). This led to
a segmentation fault when starting FFmpeg with MTL audio plugins.

This commit fixes the error handling by checking if the return value is non zero.

Fixes: 065923f ("Refactor FFmpeg audio plugin sample rate parsing")
Signed-off-by: Konstantin Ilichev <konstantin.ilichev@intel.com>
Change-type: DefectResolution
@DawidWesierski4
Copy link
Collaborator

lgtm

@DawidWesierski4 DawidWesierski4 changed the title Fix error handling in parsing sample freq in FFmpeg audio plugins Fix: error handling in parsing sample freq in FFmpeg audio plugins Sep 24, 2024
@DawidWesierski4
Copy link
Collaborator

Just a small comment
Probably we should imperative mode in commit messages

IMO its readable enough though

@ko80
Copy link
Contributor Author

ko80 commented Sep 24, 2024

Just a small comment Probably we should imperative mode in commit messages

IMO its readable enough though

Agreed on using an appropriate style of commit messages in imperative mode in the future commits. This one goes as it is.

@DawidWesierski4 DawidWesierski4 merged commit dbb4cd6 into OpenVisualCloud:main Sep 24, 2024
28 checks passed
Copy link
Collaborator

@skolelis skolelis left a comment

Choose a reason for hiding this comment

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

LGTM. Great finding! :)

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

Successfully merging this pull request may close these issues.

4 participants