ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,

                      AVStream *st, RMStream *ast, AVPacket *pkt)

{

    RMDemuxContext *rm = s->priv_data;



    assert (rm->audio_pkt_cnt > 0);



    if (ast->deint_id == DEINT_ID_VBRF ||

        ast->deint_id == DEINT_ID_VBRS)

        av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);

    else {

        av_new_packet(pkt, st->codec->block_align);

        memcpy(pkt->data, ast->pkt.data + st->codec->block_align * //FIXME avoid this

               (ast->sub_packet_h * ast->audio_framesize / st->codec->block_align - rm->audio_pkt_cnt),

               st->codec->block_align);

    }

    rm->audio_pkt_cnt--;

    if ((pkt->pts = ast->audiotimestamp) != AV_NOPTS_VALUE) {

        ast->audiotimestamp = AV_NOPTS_VALUE;

        pkt->flags = AV_PKT_FLAG_KEY;

    } else

        pkt->flags = 0;

    pkt->stream_index = st->index;



    return rm->audio_pkt_cnt;

}

ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,

                      AVStream *st, RMStream *ast, AVPacket *pkt)

{

    RMDemuxContext *rm = s->priv_data;



    assert (rm->audio_pkt_cnt > 0);



    if (ast->deint_id == DEINT_ID_VBRF ||

        ast->deint_id == DEINT_ID_VBRS)

        av_get_packet(pb, pkt, ast->sub_packet_lengths[ast->sub_packet_cnt - rm->audio_pkt_cnt]);

    else {

        av_new_packet(pkt, st->codec->block_align);

        memcpy(pkt->data, ast->pkt.data + st->codec->block_align * 

               (ast->sub_packet_h * ast->audio_framesize / st->codec->block_align - rm->audio_pkt_cnt),

               st->codec->block_align);

    }

    rm->audio_pkt_cnt--;

    if ((pkt->pts = ast->audiotimestamp) != AV_NOPTS_VALUE) {

        ast->audiotimestamp = AV_NOPTS_VALUE;

        pkt->flags = AV_PKT_FLAG_KEY;

    } else

        pkt->flags = 0;

    pkt->stream_index = st->index;



    return rm->audio_pkt_cnt;

}

FUNC_0 (AVFormatContext *VAR_0, AVIOContext *VAR_1,

                      AVStream *VAR_2, RMStream *VAR_3, AVPacket *VAR_4)

{

    RMDemuxContext *rm = VAR_0->priv_data;



    assert (rm->audio_pkt_cnt > 0);



    if (VAR_3->deint_id == DEINT_ID_VBRF ||

        VAR_3->deint_id == DEINT_ID_VBRS)

        av_get_packet(VAR_1, VAR_4, VAR_3->sub_packet_lengths[VAR_3->sub_packet_cnt - rm->audio_pkt_cnt]);

    else {

        av_new_packet(VAR_4, VAR_2->codec->block_align);

        memcpy(VAR_4->data, VAR_3->VAR_4.data + VAR_2->codec->block_align * 

               (VAR_3->sub_packet_h * VAR_3->audio_framesize / VAR_2->codec->block_align - rm->audio_pkt_cnt),

               VAR_2->codec->block_align);

    }

    rm->audio_pkt_cnt--;

    if ((VAR_4->pts = VAR_3->audiotimestamp) != AV_NOPTS_VALUE) {

        VAR_3->audiotimestamp = AV_NOPTS_VALUE;

        VAR_4->flags = AV_PKT_FLAG_KEY;

    } else

        VAR_4->flags = 0;

    VAR_4->stream_index = VAR_2->index;



    return rm->audio_pkt_cnt;

}

FUNC_0 (AVFormatContext *VAR_0, AVIOContext *VAR_1,
AVStream *VAR_2, RMStream *VAR_3, AVPacket *VAR_4)
{ RMDemuxContext *rm = VAR_0->priv_data; assert (rm->audio_pkt_cnt > 0); if (VAR_3->deint_id == DEINT_ID_VBRF ||
VAR_3->deint_id == DEINT_ID_VBRS)
av_get_packet(VAR_1, VAR_4, VAR_3->sub_packet_lengths[VAR_3->sub_packet_cnt - rm->audio_pkt_cnt]); else { av_new_packet(VAR_4, VAR_2->codec->block_align); memcpy(VAR_4->data, VAR_3->VAR_4.data + VAR_2->codec->block_align *
(VAR_3->sub_packet_h * VAR_3->audio_framesize / VAR_2->codec->block_align - rm->audio_pkt_cnt),
VAR_2->codec->block_align); } rm->audio_pkt_cnt--; if ((VAR_4->pts = VAR_3->audiotimestamp) != AV_NOPTS_VALUE) { VAR_3->audiotimestamp = AV_NOPTS_VALUE; VAR_4->flags = AV_PKT_FLAG_KEY; } else VAR_4->flags = 0; VAR_4->stream_index = VAR_2->index; return rm->audio_pkt_cnt; }