This avoids allocating space for a too large buffer for all the
name strings.
Signed-off-by: Martin Storsjö <martin@martin.st>
RTPDynamicProtocolHandler *handler;
for (handler = rtp_first_dynamic_payload_handler;
handler; handler = handler->next)
- if (!av_strcasecmp(name, handler->enc_name) &&
+ if (handler->enc_name &&
+ !av_strcasecmp(name, handler->enc_name) &&
codec_type == handler->codec_type)
return handler;
return NULL;
int len, uint16_t seq, int flags);
struct RTPDynamicProtocolHandler {
- const char enc_name[50];
+ const char *enc_name;
enum AVMediaType codec_type;
enum AVCodecID codec_id;
int static_payload_id; /* 0 means no payload id is set. 0 is a valid