static int tta_read_packet(AVFormatContext *s, AVPacket *pkt)

{

    TTAContext *c = s->priv_data;

    AVStream *st = s->streams[0];

    int size, ret;



    // FIXME!

    if (c->currentframe > c->totalframes)

        return -1;



    size = st->index_entries[c->currentframe].size;



    ret = av_get_packet(s->pb, pkt, size);

    pkt->dts = st->index_entries[c->currentframe++].timestamp;

    return ret;

}

static int tta_read_packet(AVFormatContext *s, AVPacket *pkt)

{

    TTAContext *c = s->priv_data;

    AVStream *st = s->streams[0];

    int size, ret;



    

    if (c->currentframe > c->totalframes)

        return -1;



    size = st->index_entries[c->currentframe].size;



    ret = av_get_packet(s->pb, pkt, size);

    pkt->dts = st->index_entries[c->currentframe++].timestamp;

    return ret;

}

    if (c->currentframe > c->totalframes)
static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)

{

    TTAContext *c = VAR_0->priv_data;

    AVStream *st = VAR_0->streams[0];

    int VAR_2, VAR_3;



    

    if (c->currentframe > c->totalframes)

        return -1;



    VAR_2 = st->index_entries[c->currentframe].VAR_2;



    VAR_3 = av_get_packet(VAR_0->pb, VAR_1, VAR_2);

    VAR_1->dts = st->index_entries[c->currentframe++].timestamp;

    return VAR_3;

}

static int FUNC_0(AVFormatContext *VAR_0, AVPacket *VAR_1)
{ TTAContext *c = VAR_0->priv_data; AVStream *st = VAR_0->streams[0]; int VAR_2, VAR_3; if (c->currentframe > c->totalframes)
return -1; VAR_2 = st->index_entries[c->currentframe].VAR_2; VAR_3 = av_get_packet(VAR_0->pb, VAR_1, VAR_2); VAR_1->dts = st->index_entries[c->currentframe++].timestamp; return VAR_3; }