OpenVisualCloud / Media-Transport-Library

A real-time media transport(DPDK, AF_XDP, RDMA) stack for both raw and compressed video based on COTS hardware.
BSD 3-Clause "New" or "Revised" License
171 stars 55 forks source link

Intel MTL rejects valid RTP payload type of 127 #946

Closed hogliux closed 3 months ago

hogliux commented 3 months ago

Description

Intel MTL rejects the valid RTP payload type of 127 with the following error:

MTL: 2024-08-13 11:21:13, Error: rx_audio_ops_check, invalid payload_type 127
MTL: 2024-08-13 11:21:13, Error: st30_rx_create, rx_audio_ops_check fail -22
MTL: 2024-08-13 11:21:13, Error: rx_st30p_create_transport(0), transport create fail
MTL: 2024-08-13 11:21:13, Error: st30p_rx_create(0), create transport faill

This is due to an incorrect upper limit check in lib/src/mt_util.h:92:

static inline bool st_is_valid_payload_type(int payload_type) {
  /* Zero means disable the payload_type check */
  if (payload_type >= 0 && payload_type < 0x7F)
    return true;
  else
    return false;
}

The same bug can also be found in app/src/parse_json.c:467. Other source files (for example ecosystem/ffmpeg_plugin/mtl_common.c correctly test for RTP payload validity.

Note that Linux pipewire's aes67 support uses payload 127 by default (hard-coded). So this issue, is a blocker for pipewire <-> MTL compatibility.

Fix A fix for this issue can be found in this PR.

Sakoram commented 3 months ago

Hi, Thank you for your contribution

You are right, according to rfc3551 the RTP payload type number can be up to and including 127.

hogliux commented 3 months ago

Thank you!