static char *sdp_media_attributes(char *buff, int size, AVCodecContext *c, int payload_type)

{

    char *config = NULL;



    switch (c->codec_id) {

        case CODEC_ID_MPEG4:

            if (c->flags & CODEC_FLAG_GLOBAL_HEADER) {

                config = extradata2config(c->extradata, c->extradata_size);

            }

            av_strlcatf(buff, size, "a=rtpmap:%d MP4V-ES/90000\r\n"

                                    "a=fmtp:%d profile-level-id=1%s\r\n",

                                     payload_type,

                                     payload_type, config ? config : "");

            break;

        case CODEC_ID_AAC:

            if (c->flags & CODEC_FLAG_GLOBAL_HEADER) {

                config = extradata2config(c->extradata, c->extradata_size);

            } else {

                /* FIXME: maybe we can forge config information based on the

                 *        codec parameters...

                 */

                av_log(NULL, AV_LOG_ERROR, "AAC with no global headers is currently not supported\n");

                return NULL;

            }

            if (config == NULL) {

                return NULL;

            }

            av_strlcatf(buff, size, "a=rtpmap:%d MPEG4-GENERIC/%d/%d\r\n"

                                    "a=fmtp:%d profile-level-id=1;"

                                    "mode=AAC-hbr;sizelength=13;indexlength=3;"

                                    "indexdeltalength=3%s\r\n",

                                     payload_type, c->sample_rate, c->channels,

                                     payload_type, config);

            break;

        default:

            /* Nothing special to do, here... */

            break;

    }



    av_free(config);



    return buff;

}

static char *sdp_media_attributes(char *buff, int size, AVCodecContext *c, int payload_type)

{

    char *config = NULL;



    switch (c->codec_id) {

        case CODEC_ID_MPEG4:

            if (c->flags & CODEC_FLAG_GLOBAL_HEADER) {

                config = extradata2config(c->extradata, c->extradata_size);

            }

            av_strlcatf(buff, size, "a=rtpmap:%d MP4V-ES/90000\r\n"

                                    "a=fmtp:%d profile-level-id=1%s\r\n",

                                     payload_type,

                                     payload_type, config ? config : "");

            break;

        case CODEC_ID_AAC:

            if (c->flags & CODEC_FLAG_GLOBAL_HEADER) {

                config = extradata2config(c->extradata, c->extradata_size);

            } else {

                





                av_log(NULL, AV_LOG_ERROR, "AAC with no global headers is currently not supported\n");

                return NULL;

            }

            if (config == NULL) {

                return NULL;

            }

            av_strlcatf(buff, size, "a=rtpmap:%d MPEG4-GENERIC/%d/%d\r\n"

                                    "a=fmtp:%d profile-level-id=1;"

                                    "mode=AAC-hbr;sizelength=13;indexlength=3;"

                                    "indexdeltalength=3%s\r\n",

                                     payload_type, c->sample_rate, c->channels,

                                     payload_type, config);

            break;

        default:

            

            break;

    }



    av_free(config);



    return buff;

}

static char *FUNC_0(char *VAR_0, int VAR_1, AVCodecContext *VAR_2, int VAR_3)

{

    char *VAR_4 = NULL;



    switch (VAR_2->codec_id) {

        case CODEC_ID_MPEG4:

            if (VAR_2->flags & CODEC_FLAG_GLOBAL_HEADER) {

                VAR_4 = extradata2config(VAR_2->extradata, VAR_2->extradata_size);

            }

            av_strlcatf(VAR_0, VAR_1, "a=rtpmap:%d MP4V-ES/90000\r\n"

                                    "a=fmtp:%d profile-level-id=1%s\r\n",

                                     VAR_3,

                                     VAR_3, VAR_4 ? VAR_4 : "");

            break;

        case CODEC_ID_AAC:

            if (VAR_2->flags & CODEC_FLAG_GLOBAL_HEADER) {

                VAR_4 = extradata2config(VAR_2->extradata, VAR_2->extradata_size);

            } else {

                





                av_log(NULL, AV_LOG_ERROR, "AAC with no global headers is currently not supported\n");

                return NULL;

            }

            if (VAR_4 == NULL) {

                return NULL;

            }

            av_strlcatf(VAR_0, VAR_1, "a=rtpmap:%d MPEG4-GENERIC/%d/%d\r\n"

                                    "a=fmtp:%d profile-level-id=1;"

                                    "mode=AAC-hbr;sizelength=13;indexlength=3;"

                                    "indexdeltalength=3%s\r\n",

                                     VAR_3, VAR_2->sample_rate, VAR_2->channels,

                                     VAR_3, VAR_4);

            break;

        default:

            

            break;

    }



    av_free(VAR_4);



    return VAR_0;

}

static char *FUNC_0(char *VAR_0, int VAR_1, AVCodecContext *VAR_2, int VAR_3)
{ char *VAR_4 = NULL; switch (VAR_2->codec_id) { case CODEC_ID_MPEG4:
if (VAR_2->flags & CODEC_FLAG_GLOBAL_HEADER) { VAR_4 = extradata2config(VAR_2->extradata, VAR_2->extradata_size); } av_strlcatf(VAR_0, VAR_1, "a=rtpmap:%d MP4V-ES/90000\r\n"
"a=fmtp:%d profile-level-id=1%s\r\n",
VAR_3,
VAR_3, VAR_4 ? VAR_4 : ""); break; case CODEC_ID_AAC:
if (VAR_2->flags & CODEC_FLAG_GLOBAL_HEADER) { VAR_4 = extradata2config(VAR_2->extradata, VAR_2->extradata_size); } else { av_log(NULL, AV_LOG_ERROR, "AAC with no global headers is currently not supported\n"); return NULL; } if (VAR_4 == NULL) { return NULL; } av_strlcatf(VAR_0, VAR_1, "a=rtpmap:%d MPEG4-GENERIC/%d/%d\r\n"
"a=fmtp:%d profile-level-id=1;" "mode=AAC-hbr;sizelength=13;indexlength=3;" "indexdeltalength=3%s\r\n",
VAR_3, VAR_2->sample_rate, VAR_2->channels,
VAR_3, VAR_4); break; default:
break; } av_free(VAR_4); return VAR_0; }