AVI demuxer now also check the number of frames from the index and the avi header. Thanks MSJ for the report on the forum.