Revision 5dc5c43b

View differences:

libavformat/mov.c
2055 2055
    return 0;
2056 2056
}
2057 2057

  
2058
static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
2058
static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
2059 2059
{
2060
    MOVContext *mov = s->priv_data;
2061
    MOVStreamContext *sc = 0;
2062
    AVIndexEntry *sample = 0;
2063
    AVStream *st = NULL;
2060
    AVIndexEntry *sample = NULL;
2064 2061
    int64_t best_dts = INT64_MAX;
2065
    int i, ret;
2066
 retry:
2062
    int i;
2067 2063
    for (i = 0; i < s->nb_streams; i++) {
2068 2064
        AVStream *avst = s->streams[i];
2069 2065
        MOVStreamContext *msc = avst->priv_data;
......
2078 2074
                  (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) {
2079 2075
                sample = current_sample;
2080 2076
                best_dts = dts;
2081
                st = avst;
2077
                *st = avst;
2082 2078
            }
2083 2079
        }
2084 2080
    }
2081
    return sample;
2082
}
2083

  
2084
static int mov_read_packet(AVFormatContext *s, AVPacket *pkt)
2085
{
2086
    MOVContext *mov = s->priv_data;
2087
    MOVStreamContext *sc;
2088
    AVIndexEntry *sample;
2089
    AVStream *st = NULL;
2090
    int ret;
2091
 retry:
2092
    sample = mov_find_next_sample(s, &st);
2085 2093
    if (!sample) {
2086 2094
        mov->found_mdat = 0;
2087 2095
        if (!url_is_streamed(s->pb) ||

Also available in: Unified diff