module-rtp: allocate receive buffer based on MTU

Use the MTU to allocate the receive buffer instead of using a hardcoded
size.

Fixes #4394
This commit is contained in:
Wim Taymans 2024-11-11 12:03:32 +01:00
parent a53bc035c0
commit 44340fde05
3 changed files with 23 additions and 5 deletions

View file

@ -665,10 +665,15 @@ uint64_t rtp_stream_get_time(struct rtp_stream *s, uint32_t *rate)
uint16_t rtp_stream_get_seq(struct rtp_stream *s)
{
struct impl *impl = (struct impl*)s;
return impl->seq;
}
size_t rtp_stream_get_mtu(struct rtp_stream *s)
{
struct impl *impl = (struct impl*)s;
return impl->mtu;
}
void rtp_stream_set_first(struct rtp_stream *s)
{
struct impl *impl = (struct impl*)s;

View file

@ -55,6 +55,8 @@ uint64_t rtp_stream_get_time(struct rtp_stream *s, uint32_t *rate);
uint16_t rtp_stream_get_seq(struct rtp_stream *s);
size_t rtp_stream_get_mtu(struct rtp_stream *s);
void rtp_stream_set_first(struct rtp_stream *s);
void rtp_stream_set_error(struct rtp_stream *s, int res, const char *error);