* libavi.c: a sanity check to prevent some segfault with corrupted