static int xiph_parse_sdp_line(AVFormatContext *s, int st_index,

                                 PayloadContext *data, const char *line)

{

    const char *p;

    char *value;

    char attr[25];

    int value_size = strlen(line), attr_size = sizeof(attr), res = 0;

    AVCodecContext* codec = s->streams[st_index]->codec;



    assert(codec->id == CODEC_ID_THEORA);

    assert(data);



    if (!(value = av_malloc(value_size))) {

        av_log(codec, AV_LOG_ERROR, "Out of memory\n");

        return AVERROR(ENOMEM);

    }



    if (av_strstart(line, "fmtp:", &p)) {

        // remove protocol identifier

        while (*p && *p == ' ') p++; // strip spaces

        while (*p && *p != ' ') p++; // eat protocol identifier

        while (*p && *p == ' ') p++; // strip trailing spaces



        while (ff_rtsp_next_attr_and_value(&p,

                                           attr, attr_size,

                                           value, value_size)) {

            res = xiph_parse_fmtp_pair(codec, data, attr, value);

            if (res < 0 && res != AVERROR_PATCHWELCOME)

                return res;

        }

    }



    av_free(value);

    return 0;

}

static int xiph_parse_sdp_line(AVFormatContext *s, int st_index,

                                 PayloadContext *data, const char *line)

{

    const char *p;

    char *value;

    char attr[25];

    int value_size = strlen(line), attr_size = sizeof(attr), res = 0;

    AVCodecContext* codec = s->streams[st_index]->codec;



    assert(codec->id == CODEC_ID_THEORA);

    assert(data);



    if (!(value = av_malloc(value_size))) {

        av_log(codec, AV_LOG_ERROR, "Out of memory\n");

        return AVERROR(ENOMEM);

    }



    if (av_strstart(line, "fmtp:", &p)) {

        

        while (*p && *p == ' ') p++; 

        while (*p && *p != ' ') p++; 

        while (*p && *p == ' ') p++; 



        while (ff_rtsp_next_attr_and_value(&p,

                                           attr, attr_size,

                                           value, value_size)) {

            res = xiph_parse_fmtp_pair(codec, data, attr, value);

            if (res < 0 && res != AVERROR_PATCHWELCOME)

                return res;

        }

    }



    av_free(value);

    return 0;

}

    assert(codec->id == CODEC_ID_THEORA);
static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,

                                 PayloadContext *VAR_2, const char *VAR_3)

{

    const char *VAR_4;

    char *VAR_5;

    char VAR_6[25];

    int VAR_7 = strlen(VAR_3), VAR_8 = sizeof(VAR_6), VAR_9 = 0;

    AVCodecContext* codec = VAR_0->streams[VAR_1]->codec;



    assert(codec->id == CODEC_ID_THEORA);

    assert(VAR_2);



    if (!(VAR_5 = av_malloc(VAR_7))) {

        av_log(codec, AV_LOG_ERROR, "Out of memory\n");

        return AVERROR(ENOMEM);

    }



    if (av_strstart(VAR_3, "fmtp:", &VAR_4)) {

        

        while (*VAR_4 && *VAR_4 == ' ') VAR_4++; 

        while (*VAR_4 && *VAR_4 != ' ') VAR_4++; 

        while (*VAR_4 && *VAR_4 == ' ') VAR_4++; 



        while (ff_rtsp_next_attr_and_value(&VAR_4,

                                           VAR_6, VAR_8,

                                           VAR_5, VAR_7)) {

            VAR_9 = xiph_parse_fmtp_pair(codec, VAR_2, VAR_6, VAR_5);

            if (VAR_9 < 0 && VAR_9 != AVERROR_PATCHWELCOME)

                return VAR_9;

        }

    }



    av_free(VAR_5);

    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0, int VAR_1,
PayloadContext *VAR_2, const char *VAR_3)
{ const char *VAR_4; char *VAR_5; char VAR_6[25]; int VAR_7 = strlen(VAR_3), VAR_8 = sizeof(VAR_6), VAR_9 = 0; AVCodecContext* codec = VAR_0->streams[VAR_1]->codec; assert(codec->id == CODEC_ID_THEORA); assert(VAR_2); if (!(VAR_5 = av_malloc(VAR_7))) { av_log(codec, AV_LOG_ERROR, "Out of memory\n"); return AVERROR(ENOMEM); } if (av_strstart(VAR_3, "fmtp:", &VAR_4)) { while (*VAR_4 && *VAR_4 == ' ') VAR_4++; while (*VAR_4 && *VAR_4 != ' ') VAR_4++; while (*VAR_4 && *VAR_4 == ' ') VAR_4++; while (ff_rtsp_next_attr_and_value(&VAR_4,
VAR_6, VAR_8,
VAR_5, VAR_7)) { VAR_9 = xiph_parse_fmtp_pair(codec, VAR_2, VAR_6, VAR_5); if (VAR_9 < 0 && VAR_9 != AVERROR_PATCHWELCOME)
return VAR_9; } } av_free(VAR_5); return 0; }