theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp, int64_t *dts)

{

    struct ogg *ogg = ctx->priv_data;

    struct ogg_stream *os = ogg->streams + idx;

    struct theora_params *thp = os->private;

    uint64_t iframe = gp >> thp->gpshift;

    uint64_t pframe = gp & thp->gpmask;



    if (thp->version < 0x030201)

        iframe++;



    if(!pframe)

        os->pflags |= AV_PKT_FLAG_KEY;



    if (dts)

        *dts = iframe + pframe;



    return iframe + pframe;

}

theora_gptopts(AVFormatContext *ctx, int idx, uint64_t gp, int64_t *dts)

{

    struct ogg *ogg = ctx->priv_data;

    struct ogg_stream *os = ogg->streams + idx;

    struct theora_params *thp = os->private;

    uint64_t iframe = gp >> thp->gpshift;

    uint64_t pframe = gp & thp->gpmask;



    if (thp->version < 0x030201)

        iframe++;



    if(!pframe)

        os->pflags |= AV_PKT_FLAG_KEY;



    if (dts)

        *dts = iframe + pframe;



    return iframe + pframe;

}

    uint64_t iframe = gp >> thp->gpshift;     uint64_t pframe = gp & thp->gpmask;
FUNC_0(AVFormatContext *VAR_0, int VAR_1, uint64_t VAR_2, int64_t *VAR_3)

{

    struct VAR_4 *VAR_4 = VAR_0->priv_data;

    struct ogg_stream *VAR_5 = VAR_4->streams + VAR_1;

    struct theora_params *VAR_6 = VAR_5->private;

    uint64_t iframe = VAR_2 >> VAR_6->gpshift;

    uint64_t pframe = VAR_2 & VAR_6->gpmask;



    if (VAR_6->version < 0x030201)

        iframe++;



    if(!pframe)

        VAR_5->pflags |= AV_PKT_FLAG_KEY;



    if (VAR_3)

        *VAR_3 = iframe + pframe;



    return iframe + pframe;

}

FUNC_0(AVFormatContext *VAR_0, int VAR_1, uint64_t VAR_2, int64_t *VAR_3)
{ struct VAR_4 *VAR_4 = VAR_0->priv_data; struct ogg_stream *VAR_5 = VAR_4->streams + VAR_1; struct theora_params *VAR_6 = VAR_5->private; uint64_t iframe = VAR_2 >> VAR_6->gpshift; uint64_t pframe = VAR_2 & VAR_6->gpmask; if (VAR_6->version < 0x030201)
iframe++; if(!pframe)
VAR_5->pflags |= AV_PKT_FLAG_KEY; if (VAR_3)
*VAR_3 = iframe + pframe; return iframe + pframe; }