diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 86bea76624..2ad9a94ba8 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1467,7 +1467,8 @@ static int avi_read_idx1(AVFormatContext *s, int size) ast = st->priv_data; if (first_packet && first_packet_pos) { - data_offset = first_packet_pos - pos; + if (avi->movi_list + 4 != pos || pos + 500 > first_packet_pos) + data_offset = first_packet_pos - pos; first_packet = 0; } pos += data_offset;