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

[core] Move srt_rejectreason_str implementation to srt_c_api #2271

Merged
merged 2 commits into from
Apr 11, 2022

Conversation

quink-black
Copy link
Contributor

No description provided.

@maxsharabayko
Copy link
Collaborator

maxsharabayko commented Apr 4, 2022

This PR also fixes the missing extern "C" in common.cpp for API function srt_rejectreason_str() and API array srt_rejectreason_msg.
I am not sure though why the srt_rejectreason_msg is present in the API (added in v1.3.4 in PR #720).
It is quite unsafe because the size is not known from the above. 🤔

@maxsharabayko maxsharabayko added [API] Area: Changes in SRT library API Type: Bug Indicates an unexpected problem or unintended behavior labels Apr 4, 2022
@maxsharabayko maxsharabayko added this to the v1.4.5 milestone Apr 4, 2022
@quink-black
Copy link
Contributor Author

This PR also fixes the missing extern "C" in common.cpp for API function srt_rejectreason_str() and API array srt_rejectreason_msg. I am not sure though why the srt_rejectreason_msg is present in the API (added in v1.3.4 in PR #720). It is quite unsafe because the size is not known from the above. 🤔

srt_rejectreason_msg shouldn't be present in the API.

  • But once it's there, users may pass enum SRT_REJECT_REASON directly as index to the array. So it cannot be removed directly.
  • Add array size to the API may misleading users to use the array directly.

I think it should be marked as deprecated.

@maxsharabayko maxsharabayko merged commit 1dacc2a into Haivision:master Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[API] Area: Changes in SRT library API Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants