/* read index from FLT packet into stream 0 av_index  */
static void gxf_read_index(AVFormatContext *s, int pkt_len)
/* read index from FLT packet into stream 0 av_index  */
static void gxf_read_index(AVFormatContext *s, int pkt_len)
{
        av_log(s, AV_LOG_ERROR, "too many index entries %u (%x)\n", map_cnt, map_cnt);
        map_cnt = 1000;
    }
    if (pkt_len < 4 * map_cnt) {
        av_log(s, AV_LOG_ERROR, "invalid index length\n");
        url_fskip(pb, pkt_len);
        return;
    }
    pkt_len -= 4 * map_cnt;
    av_add_index_entry(st, 0, 0, 0, 0, 0);
    for (i = 0; i < map_cnt; i++)
        av_add_index_entry(st, (uint64_t)get_le32(pb) * 1024,
                           i * (uint64_t)fields_per_map + 1, 0, 0, 0);
    url_fskip(pb, pkt_len);
}