if (!strcmp(buf, "MP4V-ES")) { codec->codec_id = CODEC_ID_MPEG4;
if (payload_type >= RTP_PT_PRIVATE) {  for (i = 0; AVRtpDynamicPayloadTypes[i].codec_id != CODEC_ID_NONE; ++i) if (!strcmp(buf, AVRtpDynamicPayloadTypes[i].enc_name) && (codec->codec_type == AVRtpDynamicPayloadTypes[i].codec_type)) { codec->codec_id = AVRtpDynamicPayloadTypes[i].codec_id; break; } } else {  for (i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i) if (!strcmp(buf, AVRtpPayloadTypes[i].enc_name) && (codec->codec_type == AVRtpPayloadTypes[i].codec_type)){ codec->codec_id = AVRtpPayloadTypes[i].codec_id; break; } }  c = avcodec_find_decoder(codec->codec_id); if (c && c->name) c_name = (char *)c->name; else c_name = (char *)NULL;  if (c_name) { get_word_sep(buf, sizeof(buf), "/", &p); i = atoi(buf); switch (codec->codec_type) { case CODEC_TYPE_AUDIO: av_log(codec, AV_LOG_DEBUG, " audio codec set to : %s\n", c_name); codec->sample_rate = RTSP_DEFAULT_AUDIO_SAMPLERATE; codec->channels = RTSP_DEFAULT_NB_AUDIO_CHANNELS; if (i > 0) { codec->sample_rate = i; get_word_sep(buf, sizeof(buf), "/", &p); i = atoi(buf); if (i > 0) codec->channels = i; } av_log(codec, AV_LOG_DEBUG, " audio samplerate set to : %i\n", codec->sample_rate); av_log(codec, AV_LOG_DEBUG, " audio channels set to : %i\n", codec->channels); break; case CODEC_TYPE_VIDEO: av_log(codec, AV_LOG_DEBUG, " video codec set to : %s\n", c_name); break; default: break; }
static int sdp_parse_rtpmap(AVCodecContext *codec, const char *p){    char buf[256];    /* codec name */    get_word_sep(buf, sizeof(buf), "/", &p);    if (!strcmp(buf, "MP4V-ES")) {        codec->codec_id = CODEC_ID_MPEG4;        return 0;    } else {        return -1;    }}