static int mov_seek_fragment(AVFormatContext *s, AVStream *st, int64_t timestamp)

{

    MOVContext *mov = s->priv_data;

    int i, j;



    if (!mov->fragment_index_complete)

        return 0;



    for (i = 0; i < mov->fragment_index_count; i++) {

        if (mov->fragment_index_data[i]->track_id == st->id) {

            MOVFragmentIndex *index = index = mov->fragment_index_data[i];

            for (j = index->item_count - 1; j >= 0; j--) {

                if (index->items[j].time <= timestamp) {

                    if (index->items[j].headers_read)

                        return 0;



                    return mov_switch_root(s, index->items[j].moof_offset);

                }

            }

        }

    }



    return 0;

}

static int mov_seek_fragment(AVFormatContext *s, AVStream *st, int64_t timestamp)

{

    MOVContext *mov = s->priv_data;

    int i, j;



    if (!mov->fragment_index_complete)

        return 0;



    for (i = 0; i < mov->fragment_index_count; i++) {

        if (mov->fragment_index_data[i]->track_id == st->id) {

            MOVFragmentIndex *index = index = mov->fragment_index_data[i];

            for (j = index->item_count - 1; j >= 0; j--) {

                if (index->items[j].time <= timestamp) {

                    if (index->items[j].headers_read)

                        return 0;



                    return mov_switch_root(s, index->items[j].moof_offset);

                }

            }

        }

    }



    return 0;

}

            MOVFragmentIndex *index = index = mov->fragment_index_data[i];
static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, int64_t VAR_2)

{

    MOVContext *mov = VAR_0->priv_data;

    int VAR_3, VAR_4;



    if (!mov->fragment_index_complete)

        return 0;



    for (VAR_3 = 0; VAR_3 < mov->fragment_index_count; VAR_3++) {

        if (mov->fragment_index_data[VAR_3]->track_id == VAR_1->id) {

            MOVFragmentIndex *index = index = mov->fragment_index_data[VAR_3];

            for (VAR_4 = index->item_count - 1; VAR_4 >= 0; VAR_4--) {

                if (index->items[VAR_4].time <= VAR_2) {

                    if (index->items[VAR_4].headers_read)

                        return 0;



                    return mov_switch_root(VAR_0, index->items[VAR_4].moof_offset);

                }

            }

        }

    }



    return 0;

}

static int FUNC_0(AVFormatContext *VAR_0, AVStream *VAR_1, int64_t VAR_2)
{ MOVContext *mov = VAR_0->priv_data; int VAR_3, VAR_4; if (!mov->fragment_index_complete)
return 0; for (VAR_3 = 0; VAR_3 < mov->fragment_index_count; VAR_3++) { if (mov->fragment_index_data[VAR_3]->track_id == VAR_1->id) { MOVFragmentIndex *index = index = mov->fragment_index_data[VAR_3]; for (VAR_4 = index->item_count - 1; VAR_4 >= 0; VAR_4--) { if (index->items[VAR_4].time <= VAR_2) { if (index->items[VAR_4].headers_read)
return 0; return mov_switch_root(VAR_0, index->items[VAR_4].moof_offset); } } } } return 0; }