diff --git a/libavformat/xmv.c b/libavformat/xmv.c index 81fb94c5f7..b447d6cd25 100644 --- a/libavformat/xmv.c +++ b/libavformat/xmv.c @@ -379,6 +379,9 @@ static int xmv_fetch_new_packet(AVFormatContext *s) AVIOContext *pb = s->pb; int result; + if (xmv->this_packet_offset == xmv->next_packet_offset) + return AVERROR_EOF; + /* Seek to it */ xmv->this_packet_offset = xmv->next_packet_offset; if (avio_seek(pb, xmv->this_packet_offset, SEEK_SET) != xmv->this_packet_offset)