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 API functions LMS_StartStream() and LMS_StopStream() : #390

Open
mbraune opened this issue Dec 31, 2023 · 1 comment
Open

fix API functions LMS_StartStream() and LMS_StopStream() : #390

mbraune opened this issue Dec 31, 2023 · 1 comment

Comments

@mbraune
Copy link

mbraune commented Dec 31, 2023

pls fix wrong behaviour if stream started without creation
in src/API/lms7_api.cpp:
functions
LMS_StartStream(lms_stream_t *stream) and
LMS_StopStream(lms_stream_t *stream)
return 0 (success) if stream==NULL or stream->handle==0
this should be changed to return -1

@mbraune
Copy link
Author

mbraune commented Dec 31, 2023

suggested change:

API_EXPORT int CALL_CONV LMS_StartStream(lms_stream_t *stream)
{
    if (stream==nullptr || stream->handle==0)
        return -1;
    return reinterpret_cast<lime::StreamChannel*>(stream->handle)->Start();
}

API_EXPORT int CALL_CONV LMS_StopStream(lms_stream_t *stream)
{
    if (stream==nullptr || stream->handle==0)
        return -1;
    return reinterpret_cast<lime::StreamChannel*>(stream->handle)->Stop();
}

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