static int ogg_new_stream(AVFormatContext *s, uint32_t serial, int new_avstream)

{



    struct ogg *ogg = s->priv_data;

    int idx = ogg->nstreams++;

    AVStream *st;

    struct ogg_stream *os;



    ogg->streams = av_realloc (ogg->streams,

                               ogg->nstreams * sizeof (*ogg->streams));

    memset (ogg->streams + idx, 0, sizeof (*ogg->streams));

    os = ogg->streams + idx;

    os->serial = serial;

    os->bufsize = DECODER_BUFFER_SIZE;

    os->buf = av_malloc(os->bufsize);

    os->header = -1;



    if (new_avstream) {

        st = avformat_new_stream(s, NULL);

        if (!st)

            return AVERROR(ENOMEM);



        st->id = idx;

        avpriv_set_pts_info(st, 64, 1, 1000000);

    }



    return idx;

}

static int ogg_new_stream(AVFormatContext *s, uint32_t serial, int new_avstream)

{



    struct ogg *ogg = s->priv_data;

    int idx = ogg->nstreams++;

    AVStream *st;

    struct ogg_stream *os;



    ogg->streams = av_realloc (ogg->streams,

                               ogg->nstreams * sizeof (*ogg->streams));

    memset (ogg->streams + idx, 0, sizeof (*ogg->streams));

    os = ogg->streams + idx;

    os->serial = serial;

    os->bufsize = DECODER_BUFFER_SIZE;

    os->buf = av_malloc(os->bufsize);

    os->header = -1;



    if (new_avstream) {

        st = avformat_new_stream(s, NULL);

        if (!st)

            return AVERROR(ENOMEM);



        st->id = idx;

        avpriv_set_pts_info(st, 64, 1, 1000000);

    }



    return idx;

}

    os->buf = av_malloc(os->bufsize);
static int FUNC_0(AVFormatContext *VAR_0, uint32_t VAR_1, int VAR_2)

{



    struct VAR_3 *VAR_3 = VAR_0->priv_data;

    int VAR_4 = VAR_3->nstreams++;

    AVStream *st;

    struct ogg_stream *VAR_5;



    VAR_3->streams = av_realloc (VAR_3->streams,

                               VAR_3->nstreams * sizeof (*VAR_3->streams));

    memset (VAR_3->streams + VAR_4, 0, sizeof (*VAR_3->streams));

    VAR_5 = VAR_3->streams + VAR_4;

    VAR_5->VAR_1 = VAR_1;

    VAR_5->bufsize = DECODER_BUFFER_SIZE;

    VAR_5->buf = av_malloc(VAR_5->bufsize);

    VAR_5->header = -1;



    if (VAR_2) {

        st = avformat_new_stream(VAR_0, NULL);

        if (!st)

            return AVERROR(ENOMEM);



        st->id = VAR_4;

        avpriv_set_pts_info(st, 64, 1, 1000000);

    }



    return VAR_4;

}

static int FUNC_0(AVFormatContext *VAR_0, uint32_t VAR_1, int VAR_2)
{ struct VAR_3 *VAR_3 = VAR_0->priv_data; int VAR_4 = VAR_3->nstreams++; AVStream *st; struct ogg_stream *VAR_5; VAR_3->streams = av_realloc (VAR_3->streams,
VAR_3->nstreams * sizeof (*VAR_3->streams)); memset (VAR_3->streams + VAR_4, 0, sizeof (*VAR_3->streams)); VAR_5 = VAR_3->streams + VAR_4; VAR_5->VAR_1 = VAR_1; VAR_5->bufsize = DECODER_BUFFER_SIZE; VAR_5->buf = av_malloc(VAR_5->bufsize); VAR_5->header = -1; if (VAR_2) { st = avformat_new_stream(VAR_0, NULL); if (!st)
return AVERROR(ENOMEM); st->id = VAR_4; avpriv_set_pts_info(st, 64, 1, 1000000); } return VAR_4; }