1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

rtpdec: Change enc_name to a pointer instead of a fixed-size buffer

This avoids allocating space for a too large buffer for all the
name strings.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2015-02-23 21:53:19 +02:00
parent 0752f700d6
commit 353b492d0f
2 changed files with 3 additions and 2 deletions

View File

@ -113,7 +113,8 @@ RTPDynamicProtocolHandler *ff_rtp_handler_find_by_name(const char *name,
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;

View File

@ -113,7 +113,7 @@ typedef int (*DynamicPayloadPacketHandlerProc)(AVFormatContext *ctx,
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