Revision 433aeb62 libavformat/mov.c

View differences:

libavformat/mov.c
1727 1727
    AVIndexEntry *sample = 0;
1728 1728
    int64_t best_dts = INT64_MAX;
1729 1729
    int i;
1730

  
1730
 retry:
1731 1731
    for (i = 0; i < s->nb_streams; i++) {
1732 1732
        AVStream *st = s->streams[i];
1733 1733
        MOVStreamContext *msc = st->priv_data;
......
1747 1747
            }
1748 1748
        }
1749 1749
    }
1750
    if (!sample)
1751
        return -1;
1750
    if (!sample) {
1751
        mov->found_mdat = 0;
1752
        if (!url_is_streamed(s->pb) ||
1753
            mov_read_default(mov, s->pb, (MOV_atom_t){ 0, 0, INT64_MAX }) < 0 ||
1754
            url_feof(s->pb))
1755
            return -1;
1756
        dprintf(s, "read fragments, offset 0x%llx\n", url_ftell(s->pb));
1757
        goto retry;
1758
    }
1752 1759
    /* must be done just before reading, to avoid infinite loop on sample */
1753 1760
    sc->current_sample++;
1754 1761
    if (url_fseek(sc->pb, sample->pos, SEEK_SET) != sample->pos) {

Also available in: Unified diff