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

[Bug]: Possible problem in msgenericplc.c #38

Open
Pilyushkin opened this issue Jul 21, 2022 · 0 comments
Open

[Bug]: Possible problem in msgenericplc.c #38

Pilyushkin opened this issue Jul 21, 2022 · 0 comments
Labels

Comments

@Pilyushkin
Copy link

Context

Learning to work with RTP protocol

General information

  • Device: PC
  • OS: Ubuntu 20.04
  • Version of the App:
  • Version of the SDK: mediastreamer2-5.1.12

Expected behaviour

I wrote an additional filter for forwarding media data to the media streamer chain from the application. When testing, I pass data from the file through my filter to the media streamer chain. When the file is finished reading, a media packet less than 320 bytes in size is passed to the chain.
A plc filter is included in the media processing chain. In this filter, a memory access error occurs on line 96 (msgenericplc.c)

if (plc_context->plc_samples_used!=0) {
    /*we were doing PLC, now resuming with normal audio, continuity buffer is twice the transition delay lengths,  the second half is untouched by the update function and contains transition data generated by PLC */
   generic_plc_transition_mix((int16_t *) (m->b_rptr+transitionBufferSize), (int16_t *) (plc_context->continuity_buffer+transitionBufferSize), mgps->rate*TRANSITION_DELAY/1000);
}

This is due to a shift in the data buffer by an amount greater than the size of the buffer, or by an amount that, together with the size mgps->rate*TRANSITION_DELAY/1000, exceeds the length of the buffer.

I would like to know if this is an error in the logic in the plc module, or should I check the size of the media frame at the application level before sending it?

To Reproduce

Send a media frame less than 120 bytes to the PLC filter

Additional context

Add any other context about the problem here.

SDK logs URL

No response

@Pilyushkin Pilyushkin added the bug label Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant