lwlibav: Don't return negative value when getting picture type unless failing memory allocation.