rdt_parse_sdp_line (AVFormatContext *s, int st_index,

                    PayloadContext *rdt, const char *line)

{

    AVStream *stream = s->streams[st_index];

    const char *p = line;



    if (av_strstart(p, "OpaqueData:buffer;", &p)) {

        rdt->mlti_data = rdt_parse_b64buf(&rdt->mlti_data_size, p);

    } else if (av_strstart(p, "StartTime:integer;", &p))

        stream->first_dts = atoi(p);

    else if (av_strstart(p, "ASMRuleBook:string;", &p)) {

        int n, first = -1;



        for (n = 0; n < s->nb_streams; n++)

            if (s->streams[n]->id == stream->id) {

                int count = s->streams[n]->index + 1;

                if (first == -1) first = n;

                if (rdt->nb_rmst < count) {

                    RMStream **rmst= av_realloc(rdt->rmst, count*sizeof(*rmst));

                    if (!rmst)

                        return AVERROR(ENOMEM);

                    memset(rmst + rdt->nb_rmst, 0,

                           (count - rdt->nb_rmst) * sizeof(*rmst));

                    rdt->rmst    = rmst;

                    rdt->nb_rmst = count;

                }

                rdt->rmst[s->streams[n]->index] = ff_rm_alloc_rmstream();

                rdt_load_mdpr(rdt, s->streams[n], (n - first) * 2);



                if (s->streams[n]->codec->codec_id == CODEC_ID_AAC)

                    s->streams[n]->codec->frame_size = 1; // FIXME

           }

    }



    return 0;

}

rdt_parse_sdp_line (AVFormatContext *s, int st_index,

                    PayloadContext *rdt, const char *line)

{

    AVStream *stream = s->streams[st_index];

    const char *p = line;



    if (av_strstart(p, "OpaqueData:buffer;", &p)) {

        rdt->mlti_data = rdt_parse_b64buf(&rdt->mlti_data_size, p);

    } else if (av_strstart(p, "StartTime:integer;", &p))

        stream->first_dts = atoi(p);

    else if (av_strstart(p, "ASMRuleBook:string;", &p)) {

        int n, first = -1;



        for (n = 0; n < s->nb_streams; n++)

            if (s->streams[n]->id == stream->id) {

                int count = s->streams[n]->index + 1;

                if (first == -1) first = n;

                if (rdt->nb_rmst < count) {

                    RMStream **rmst= av_realloc(rdt->rmst, count*sizeof(*rmst));

                    if (!rmst)

                        return AVERROR(ENOMEM);

                    memset(rmst + rdt->nb_rmst, 0,

                           (count - rdt->nb_rmst) * sizeof(*rmst));

                    rdt->rmst    = rmst;

                    rdt->nb_rmst = count;

                }

                rdt->rmst[s->streams[n]->index] = ff_rm_alloc_rmstream();

                rdt_load_mdpr(rdt, s->streams[n], (n - first) * 2);



                if (s->streams[n]->codec->codec_id == CODEC_ID_AAC)

                    s->streams[n]->codec->frame_size = 1; 

           }

    }



    return 0;

}

FUNC_0 (AVFormatContext *VAR_0, int VAR_1,

                    PayloadContext *VAR_2, const char *VAR_3)

{

    AVStream *stream = VAR_0->streams[VAR_1];

    const char *VAR_4 = VAR_3;



    if (av_strstart(VAR_4, "OpaqueData:buffer;", &VAR_4)) {

        VAR_2->mlti_data = rdt_parse_b64buf(&VAR_2->mlti_data_size, VAR_4);

    } else if (av_strstart(VAR_4, "StartTime:integer;", &VAR_4))

        stream->first_dts = atoi(VAR_4);

    else if (av_strstart(VAR_4, "ASMRuleBook:string;", &VAR_4)) {

        int VAR_5, VAR_6 = -1;



        for (VAR_5 = 0; VAR_5 < VAR_0->nb_streams; VAR_5++)

            if (VAR_0->streams[VAR_5]->id == stream->id) {

                int count = VAR_0->streams[VAR_5]->index + 1;

                if (VAR_6 == -1) VAR_6 = VAR_5;

                if (VAR_2->nb_rmst < count) {

                    RMStream **rmst= av_realloc(VAR_2->rmst, count*sizeof(*rmst));

                    if (!rmst)

                        return AVERROR(ENOMEM);

                    memset(rmst + VAR_2->nb_rmst, 0,

                           (count - VAR_2->nb_rmst) * sizeof(*rmst));

                    VAR_2->rmst    = rmst;

                    VAR_2->nb_rmst = count;

                }

                VAR_2->rmst[VAR_0->streams[VAR_5]->index] = ff_rm_alloc_rmstream();

                rdt_load_mdpr(VAR_2, VAR_0->streams[VAR_5], (VAR_5 - VAR_6) * 2);



                if (VAR_0->streams[VAR_5]->codec->codec_id == CODEC_ID_AAC)

                    VAR_0->streams[VAR_5]->codec->frame_size = 1; 

           }

    }



    return 0;

}

FUNC_0 (AVFormatContext *VAR_0, int VAR_1,
PayloadContext *VAR_2, const char *VAR_3)
{ AVStream *stream = VAR_0->streams[VAR_1]; const char *VAR_4 = VAR_3; if (av_strstart(VAR_4, "OpaqueData:buffer;", &VAR_4)) { VAR_2->mlti_data = rdt_parse_b64buf(&VAR_2->mlti_data_size, VAR_4); } else if (av_strstart(VAR_4, "StartTime:integer;", &VAR_4)) stream->first_dts = atoi(VAR_4); else if (av_strstart(VAR_4, "ASMRuleBook:string;", &VAR_4)) { int VAR_5, VAR_6 = -1; for (VAR_5 = 0; VAR_5 < VAR_0->nb_streams; VAR_5++) if (VAR_0->streams[VAR_5]->id == stream->id) { int count = VAR_0->streams[VAR_5]->index + 1; if (VAR_6 == -1) VAR_6 = VAR_5; if (VAR_2->nb_rmst < count) { RMStream **rmst= av_realloc(VAR_2->rmst, count*sizeof(*rmst)); if (!rmst)
return AVERROR(ENOMEM); memset(rmst + VAR_2->nb_rmst, 0,
(count - VAR_2->nb_rmst) * sizeof(*rmst)); VAR_2->rmst    = rmst; VAR_2->nb_rmst = count; } VAR_2->rmst[VAR_0->streams[VAR_5]->index] = ff_rm_alloc_rmstream(); rdt_load_mdpr(VAR_2, VAR_0->streams[VAR_5], (VAR_5 - VAR_6) * 2); if (VAR_0->streams[VAR_5]->codec->codec_id == CODEC_ID_AAC)
VAR_0->streams[VAR_5]->codec->frame_size = 1; } } return 0; }