Hmm. When I disable the native API and use libgif-7, the animation works just fine.